Releases: ibireme/yyjson
Releases · ibireme/yyjson
Version 0.12.0
Added
- Add
yyjson_write_number()andyyjson_mut_write_number()to write a number value to a string buffer. - Add
YYJSON_READ_ALLOW_EXT_NUMBERto support extended number formats, such as0x7B,+.123. - Add
YYJSON_READ_ALLOW_EXT_ESCAPEto support extended escape, such as\a,\0,\x7B. - Add
YYJSON_READ_ALLOW_EXT_WHITESPACEto support extended whitespace, such as\v,\u2028. - Add
YYJSON_READ_ALLOW_SINGLE_QUOTED_STRto support single-quoted strings, such as'ab'. - Add
YYJSON_READ_ALLOW_UNQUOTED_KEYto allow unquoted keys, such as{a:1,b:2}. - Add
YYJSON_READ_JSON5to enable full JSON5 support.
Changed
- Removed support for non-standard JSON in the incremental reader
yyjson_incr_read().
Version 0.11.1
Fixed
- Fix errors when unaligned access is disallowed (no impact if your build was already successful).
Version 0.11.0
Added
- Add
YYJSON_READ_ALLOW_BOMflag to allow UTF-8 BOM. - Add
YYJSON_WRITE_FP_TO_FLOATflag to write real numbers using single-precison. - Add
YYJSON_WRITE_FP_TO_FIXED(prec)flag to write real numbers using fix-point notation. - Add
set_fp_to_float()andset_fp_to_fixed()functions to control the output format of a specific number. - Add
set_str_noesc()function to skip escaping for a specific string during writing. - Add
yyjson_incr_read(),yyjson_incr_new(),yyjson_incr_free()functions for incremental DOM reading.
Changed
- Rewrite the floating-point number to string functions with a new fast path.
- When comments are allowed, return
UNEXPECTED_ENDinstead ofINVALID_COMMENTfor unclosed comments. - Truncated escape sequences now report the error position at the sequence start rather than the end.
Fixed
Version 0.10.0
Version 0.9.0
Version 0.8.0
Added
- Add
YYJSON_SUBTYPE_NOESCsubtype to mark strings that do not need to be escaped. - Add
YYJSON_DISABLE_UTF8_VALIDATIONflag to allow disabling UTF-8 validation at compile-time. - Add dynamic allocator API:
yyjson_alc_dyn_new()andyyjson_alc_dyn_free(). - Add the missing API
yyjson_mut_obj_add_arr()andyyjson_mut_obj_add_obj(): #140
Changed
- Improve the write performance of strings with
YYJSON_SUBTYPE_NOESC.
Fixed
- Fix clang-16 valgrind fail: #134
- Fix compile break when both
FAST_FPandREADERare disabled
Version 0.7.0
Added
- Add
YYJSON_WRITE_PRETTY_TWO_SPACESoption to allow 2 spaces instead of 4 spaces when writing pretty JSON: #99 - Add
YYJSON_READ_BIGNUM_AS_RAWoption to read big numbers as raw strings: #124 - Add
yyjson_get_num()function to convert and return any number value asdouble: #108 - Add support for Loongarch: #112
- Add functions to get type-specific values specified by JSON Pointer: #116
- Add functions to read/write JSON with file pointer
FILE *: #122 - Add functions to support modifying memory pool size of
yyjson_mut_doc. - Add convenience functions
iter_with()for creating iterator. - Add functions to modify JSON using JSON Pointer, such as
ptr_set()andptr_remove(). - Add support for JSON Patch (RFC 6902).
Changed
- BREAKING CHANGE: Change the allocator's realloc function signature, add
old_sizeparameter for custom allocator: #100 - BREAKING CHANGE: Change
yyjson_read_number()function, addalcparameter. - DEPRECATED: Deprecate
get_pointer()functions, rename toptr_get(). - Improve performance of
yyjson_mut_write()function.
Fixed
- Fix inaccurate error code for truncated JSON: #103
Version 0.6.0
Added
- Add functions to modify the content of a JSON value, for example
yyjson_set_int(yyjson_val *val, int num). - Add functions to copy from mutable doc to immutable doc.
- Add functions to support renaming an object's key.
- Add the
yyjson_read_number()function to parse numeric strings. - Add a placeholder allocator if
yyjson_alc_pool_init()fails.
Fixed
- Fix quite NaN on MIPS and HPPA arch.
- Fixed compile error before
GCC 4.5which doesn't support empty optional extended asm label. - When built-in floating point conversion is disabled, sprintf() output for floating point numbers is missing a decimal point, for example 123 should be 123.0.
Version 0.5.1
Fixed
- Fix run-time error when compiling as
cppand 32-bit (g++-5 -m32 -fPIC) #85 - Fix incurrect output number format, remove unnecessary digits (e.g. 2.0e34 -> 2e34).
Version 0.5.0
Added
- Add LibFuzzer support.
- Add Doxygen support.
- Add functions to support serializing a single JSON value.
- Add
yyjson_mut_doc_mut_copy(),yyjson_mut_val_mut_copy(),yyjson_mut_merge_patch()function for mutable input. - Add
yyjson_equals()andyyjson_mut_equals()function to compare two values. - Add
yyjson_mut_obj_remove_key()andyyjson_mut_obj_remove_keyn()to make it easier to remove a key. - Add
YYJSON_READ_NUMBER_AS_RAWoption andRAWtype support. - Add
YYJSON_READ_ALLOW_INVALID_UNICODEandYYJSON_WRITE_ALLOW_INVALID_UNICODEoptions to allow invalid unicode.
Changed
- Change
yyjson_mut_obj_remove()return type frombooltoyyjson_mut_val *. - Rewrite string serialization function, validate unicode encoding by default.
- Rewrite the JSON Pointer implementation, remove internal malloc() calls.