| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
PostgreSQL's pg_wchar.h routines.
* Touched up various functions' documentation.
json_node's are currently encoded in UTF-8, and the JSON module is not
100% compatible with arbitrary server encodings yet. I plan to switch
from UTF-8 to the server encoding pretty soon, after which JSON should be
a well-behaved datatype as far as charsets go.
|
|
* A few various cleanups.
|
|
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.
|
|
* Affirmed (with a trivial test) that json_path returns its results breadth-first
|
|
* Removed the global variable json_escape_unicode and added a parameter for it
to the json_encode and json_encode_string C functions.
|
|
Currently, it re-encodes JSON nodes rather than preserving original text.
This is subject to change.
|
|
|