project/jsonpath.git
10 years agocli: gather all found items through a callback function
Jo-Philipp Wich [Wed, 1 Jan 2014 15:44:00 +0000 (15:44 +0000)]
cli: gather all found items through a callback function

10 years agomatcher: add user callback and support implicit index/key compares
Jo-Philipp Wich [Wed, 1 Jan 2014 15:39:20 +0000 (15:39 +0000)]
matcher: add user callback and support implicit index/key compares

- introduced callback argument in jp_match() which is invoked for each found json item
- when chaining strings or numbers in or expressions, implicitely match them against the current key

10 years agolexer: accept single quoted string literals
Jo-Philipp Wich [Tue, 31 Dec 2013 00:07:06 +0000 (00:07 +0000)]
lexer: accept single quoted string literals

10 years agoparser: fix order of declarations
Jo-Philipp Wich [Sun, 29 Dec 2013 21:31:35 +0000 (21:31 +0000)]
parser: fix order of declarations

10 years agocli: implemnt -s flag to pass json source as string argument
Jo-Philipp Wich [Sun, 29 Dec 2013 21:19:11 +0000 (21:19 +0000)]
cli: implemnt -s flag to pass json source as string argument

10 years agocli: additional flags and cleanup
Jo-Philipp Wich [Sun, 29 Dec 2013 21:05:44 +0000 (21:05 +0000)]
cli: additional flags and cleanup

* add -q flag to suppress error messages
* add -t flag to test type of result
* clean up exit codes to indicate success;
- 0 if all -t and -e expression yielded a result
- 1 if at least one -t or -e expression didn't match
- 125 when failed to open input file
- 126 when failed to parse json input
- 127 when the farser fails due to oom

10 years agoparser: change exitcode in case of oom errors
Jo-Philipp Wich [Sun, 29 Dec 2013 21:03:51 +0000 (21:03 +0000)]
parser: change exitcode in case of oom errors

10 years agoAmend gitignore
Jo-Philipp Wich [Sun, 29 Dec 2013 18:07:40 +0000 (18:07 +0000)]
Amend gitignore

10 years agoAdd gitignore file
Jo-Philipp Wich [Sun, 29 Dec 2013 18:07:00 +0000 (18:07 +0000)]
Add gitignore file

10 years agoeliminate global variables and use a private parser/lexer state
Jo-Philipp Wich [Sun, 29 Dec 2013 18:03:10 +0000 (18:03 +0000)]
eliminate global variables and use a private parser/lexer state

10 years agocmake: let generated lexer.c, parser.c depend on their respective source files, clean...
Jo-Philipp Wich [Sun, 29 Dec 2013 18:02:04 +0000 (18:02 +0000)]
cmake: let generated lexer.c, parser.c depend on their respective source files, clean generated headers

10 years agoRemove generated files
Jo-Philipp Wich [Sat, 28 Dec 2013 21:26:59 +0000 (21:26 +0000)]
Remove generated files

10 years agoInitial commit
Jo-Philipp Wich [Sat, 28 Dec 2013 21:25:20 +0000 (21:25 +0000)]
Initial commit