| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
pg_indent again).
|
|
* char() method added to JSONPath for extracting chars from strings.
Although index subscripts (those using an integer) extract characters from
strings in Stefan Goessner's JSONPath, and although it works that way in
JavaScript, I believe it is rather illogical and unexpected in the context
of JSONPath, and a poor use of the [] real estate.
Because extracting characters from strings can still be useful, I have added
a char() method for this. I implemented it now to prevent the supporting code
for character extraction from wasting away.
|
|
* Reworked json_node::orig so it can handle replacing the key or value
without altering surrounding formatting.
* json_encode (C function) is now recursive (its stack usage depends
on the depth of input). This was done because json_encode cannot rely
on nodes' ->parent fields being trustworthy, as json_replace_value
assigns JSON nodes by reference.
|
|
JPRef is a structure representing an item matched by jp_match.
Before, plain old json_node was used, which couldn't distinguish between
mutable references (actual JSON nodes from the original input)
and immutable references (e.g. characters in a string).
Yes, characters in a string are regarded as immutable because:
* That's how it is in JavaScript.
* It's easier to implement.
|
|
|