ZyX
4a29995fe7
eval/decode: Rename brackets in error messages
...
U+007D is officially RIGHT CURLY BRACKET.
U+005D is officially RIGHT SQUARE BRACKET.
2016-04-18 02:48:20 +03:00
ZyX
942e0b338c
encode: Handle incomplete surrogates like \uSURR\uOTHR
properly
2016-04-18 02:48:20 +03:00
ZyX
406562ac6d
encode: Fail to dump NaN and infinity
...
Thanks to vim/vim#654
2016-04-18 02:48:20 +03:00
ZyX
2f67786796
eval: Rename json* functions to json_*
2016-04-18 02:48:20 +03:00
ZyX
f0bd4a1494
eval/encode: Fix invalid UTF-8 strings handling:
...
1. Do not allow reading past buffer end when creating error messages.
2. Fix surrogate pairs range, avoid magic constants.
2016-04-18 02:47:13 +03:00
ZyX
569e404622
eval/encode: Fix non-utf-8 &encoding handling, add tests
2016-04-18 02:46:34 +03:00
ZyX
e303ea8a19
eval/decode: Add support for special maps
...
Special dictionaries representing map are created when encountering duplicate
key or when key is empty or contains NUL.
Also checks that values are separated by a comma/colon properly.
2016-04-18 02:45:49 +03:00
ZyX
2c378fdfaf
eval/decode: Parse strings with NUL to special dictionaries
2016-04-18 02:45:49 +03:00
ZyX
5814e29cdb
eval/decode: Fix surrogate pairs processing
2016-04-18 02:45:49 +03:00
ZyX
ea82270d30
eval/decode: Fail on control and invalid unicode characters
2016-04-18 02:45:49 +03:00
ZyX
e213ba1506
eval: Add jsondecode() function
2016-04-18 02:45:49 +03:00
ZyX
68e58444b4
eval: Add jsonencode() function
...
Ref #3471
2016-04-18 02:44:03 +03:00