Richard Startin
ed4d2a82b5
prevent truncated subexpressions + misc code cleanup ( #763 )
3 years ago
sdmms1
fcf8bf6478
Fix the issue 629 and add two testcases ( #698 )
3 years ago
mijost
8e8fc149d9
Fix concat with text and number ( #738 )
...
Co-authored-by: Jost, Michael <michael.jost@sicpa.com>
3 years ago
Cincronic
78a9420b42
Fix bug 612 and add two testcases ( #711 )
...
* fix bug 612
* modify fix bug 612
* modify fix bug 612, add one more testcase
Co-authored-by: CindyChow123 <CindyChow123>
4 years ago
Pigdrum
71ec56e38b
Fix issue #680 and two testcase ( #704 )
...
* Fix issue 680 and two testcase
* additional testcase
* adapt jdk version
* modify something wrong
* a more elegant implementation
4 years ago
René Kriegler
698dbfae27
Avoid Locale-dependant InvalidPathException in RelationalOperator, fixes #600
5 years ago
Eric Hettiaratchi
3070bd84a5
Add unit tests for com.jayway.jsonpath.internal.Utils
...
These tests were written using Diffblue Cover.
6 years ago
Kalle Stenflo
4bdf9b7bdc
bump dependency versions and fix build issues
6 years ago
Uladzislau Arlouski
cbdc9c82e0
Add support for pattern flags
6 years ago
Michael Thacker
445b9c4ebe
Fix compiling of functions with single character arguments
7 years ago
sergey
7355e30ee7
Add keys function for Map objects
...
See https://github.com/json-path/JsonPath/issues/439
7 years ago
Greenwood
02c88d70e6
adding an example with more than one replacement
7 years ago
Greenwood
a2936ebd68
inverting the relationship between root scanner and function such that the function takes a parameter which is the scanner expression
7 years ago
Greenwood
525da153d0
fixing unit test, naming and extension
7 years ago
Greenwood
851249861e
Issue #191 is a bug - supports result set functions via patterns such as $.max($..allTheNumberThings)
...
$.max($.foo, $.bar) is already supported - consiquently $.max($..allTheNumberThings) should also work.
7 years ago
Greenwood
317e68c4eb
removing created by
8 years ago
mattg
3a69db83f0
Fixes Issue #234 using late binding, ideally this might be a lambda that encapsulates its state -- given support for JDK 6+, its encapsulated state is maintained in an implementation of the interface ILateBindingValue, one for PATH functions one for JSON - its likely the JSON version doesn't have a purpose unless the JSON dynamically changes as a result of the function implementation but its better to create another impl for JSON if in the future JSON can be dynamically changed via functions(?)
...
The fault is in the Parameter object which obviously cached its value and when the outside reference changes its oblivious to that state change due to its internal cached instance of the state. Cache.getCache()... that singleton call inside of JsonContext then grabs an instance of the cached parameter, it would be thread unsafe to simple invalidate the cache because who knows for whom the cache is being invalidated.
Not caching function paths isn't an answer -- the input to a function could itself be another function - meaning the input (parameter) value would never be observed to the wrapping function and things such as take the $.max(3, 4, 5, $.avg(...)) would yield an answer without average being computed.
8 years ago
Jochen Berger
a8bc2af229
remove the get_json function that was accidentally introduced when merging #167 ( fixes #180 )
9 years ago
mchmielarz
1e3f11cbc2
Solution proposal for #181
9 years ago
Matthew J Greenwood
5e2ef13c64
added negative test cases - removed readPosition from function parameter parser, ready for review
9 years ago
Matthew J Greenwood
5d8e209141
Added an append function such that JSON can be appended to the current document and then a function executed over the result.
9 years ago
Matthew J Greenwood
01bdbe2cc3
fixing broken tests
...
changing format of functions path expr with/without args
removing errant unwrap call - added to test
9 years ago
Matthew J Greenwood
b919644425
adds an example for HttpLoading via getjson (not intended to be merged, just an example) also fixes bug #164 min/max providing wrong value
9 years ago
Matthew J Greenwood
f127edabe1
Test for string, added concat function
9 years ago
Matthew J Greenwood
f932aaf22f
working version with JSON + path expressions - need to handle error cases with tests
9 years ago
Matthew J Greenwood
fadc946032
removed braces added support for JSON - need to parse JSON now...
9 years ago
Matthew J Greenwood
b0ec61f7a1
missing dot in $avg -> $.avg - fixing CI
9 years ago
Matthew J Greenwood
1fa2b0e192
added test, removed foobar from min test - derp
9 years ago
Matthew J Greenwood
861c0b34bd
Modified abstract aggregation and the path compiler to handle nested functions, working implementation committed
...
still need to support literal function arguments. At the present time the document passed for parameter function parsing is the root document. Additionally, the braces still exist within the tokenizer - need to handle error conditions and see the consiquence of removing those from the implementation
9 years ago
Matthew J Greenwood
76cfa0e30f
Initiial implementation of PathCompiler changes to support functions that take other JsonPath elements - need to decide whether path parameters are relative to the function location (probably not)
...
Example:
$.sum({$.numbers.min()}, {$.numbers.max()})
You could also do something such as:
$.numbers.add({$.numbers.min()})
where add for each element in the array took another JsonPath parameter that we'd add to resulting in an array result with the min value of numbers added to each element in the number's array.
Obviously there's better examples than the above - but these changes allow the PathCompiler to parse the function parameters for nested JsonPath's
9 years ago
Kalle Stenflo
86ea0ac062
PathFunctions must exist when compiled. 'size' alias for 'length'.
9 years ago
Kalle Stenflo
3c1b88a547
Renamed constants an did some clean up.
9 years ago
Kalle Stenflo
ea206498cc
Bracket properties can contain path chars #154
9 years ago
Kalle Stenflo
1eb47a23d7
Renamed token package to path.
9 years ago
Kalle Stenflo
c97c70a33d
Renamed update operation 'convert' to 'map'.
9 years ago
Kalle Stenflo
ebd19526d8
Code cleanup.
9 years ago
Kalle Stenflo
0feb2bcb88
Fixed issues in Filter serialization.
9 years ago
Kalle Stenflo
3adc04bd13
Made write features JsonProvider neutral.
9 years ago
Alexey Makeyev
bcd00f7b7b
test moved to avoid visibility changes
9 years ago
gauravgupta
f25ec6c0cd
fixed the cache key and the unit test (use the same key when fetching
...
and looking up cache) #94
9 years ago
gauravgupta
9bc0f8b213
Added filters to the cache key #94
9 years ago
Kalle Stenflo
f05774a437
Fixed some tangles and removed dead tests.
10 years ago
Kalle Stenflo
4194ac3e7e
Clean up.
10 years ago
Kalle Stenflo
c88638c4ef
Fixed issues
10 years ago
Kalle Stenflo
8da4d1a1d6
Option handling improved.
11 years ago
Kalle Stenflo
20511b5cfc
Optimized imports and removed file headers.
11 years ago
Kalle Stenflo
608c1a77be
Rewrite intenals.
11 years ago
Kalle Stenflo
a83f32caba
'AND' (&&) support in ArrayEvalFilter.
11 years ago
Kalle Stenflo
ba23ae266a
Improved array slicing.
11 years ago
Kalle Stenflo
b3dd129088
found issues.
11 years ago