This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module { | |
"name": "schema", | |
"description": "JSON Schema Inference", | |
"version": "0.0.3.1", | |
"homepage": "https://gist.github.com/pkoppstein/a5abb4ebef3b0f72a6ed", | |
"license": "MIT", | |
"author": "pkoppstein at gmail dot com" | |
}; | |
# NEWS: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Version 2023.08.25 | |
# This jq module defines filters for assertion checking. | |
# The module can be included or imported in the usual way, e.g. | |
# by including a line similar to the following at the top of your program file: | |
# include "assert" {search: "."}; | |
# By changing "keys_unsorted" to "keys", this module can also be used with gojq, | |
# the Go implementation of jq. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module { | |
"name": "xml", | |
"description": "PEG parser for XML", | |
"version": "0.0.1", | |
"homepage": "https://gist.github.com/pkoppstein/addaedbb10b6fc97ff2b6b00123700ad", | |
"license": "MIT", | |
"author": "pkoppstein at gmail dot com" | |
}; | |
# This is a standalone jq module that has been tested with jq, gojq, and fq. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2014-2015 Peter Koppstein (pkoppstein at gmail dot com) 2015.05.02 | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module { | |
"name": "schema", | |
"description": "JSON Schema Inference", | |
"version": "0.0.3", | |
"homepage": "https://gist.github.com/pkoppstein/a5abb4ebef3b0f72a6ed", | |
"license": "MIT", | |
"author": "pkoppstein at gmail dot com" | |
}; | |
# NEWS: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This gist defines a jq filter for combining two JSON objects by resolving conflicts | |
# in a way that is appropriate for mapping relational tables to objects. | |
# "combine" as defined here is both commutative and associative. | |
# Example: | |
# { "id": 123, "son": "Son1", "surname": "S"} | |
# | combine({ "id": 123, "son": "Son2", "surname": "S"}) | |
# produces: { "id": 123, "son": ["Son1",Son2], "surname": "S"} | |
# Combine two entities in an array-oriented fashion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright (c) 2017 Peter Koppstein (pkoppstein at gmail dot com) 2017.01.15 | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2018 peak@princeton.edu | |
# License: Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) | |
# See http://creativecommons.org/licenses/by-nc/3.0/ | |
# Attribution shall include the copyright notice above. | |
# fromcsv.jq version: 0.4 of 2018-12-30 | |
# Requires: jq with `inputs` | |
# Source: https://gist.github.com/pkoppstein/bbbbdf7489c8c515680beb1c75fa59f2 | |
# A PEG-inspired parser for reading CSV files without the need to "slurp" them. |
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | |
"2" | |
"3" | |
"4" | |
"5", "a" | |
"""6""" | |
"""7""","a" | |
8,b,c | |
9,"",c | |
10,,c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
["1"] | |
["2"] | |
["3"] | |
["4"] | |
["5","a"] | |
["\"6\""] | |
["\"7\"","a"] | |
["8","b","c"] | |
["9","","c"] | |
["10","","c"] |
NewerOlder