All notable changes to this project will be documented in this file.
0.12.0 (2025-08-18)
Added
- Add yyjson_write_number() and yyjson_mut_write_number() to write a number value to a string buffer.
- Add YYJSON_READ_ALLOW_EXT_NUMBER to support extended number formats, such as 0x7B, +.123.
- Add YYJSON_READ_ALLOW_EXT_ESCAPE to support extended escape, such as \a, \0, \x7B.
- Add YYJSON_READ_ALLOW_EXT_WHITESPACE to support extended whitespace, such as \v, \u2028.
- Add YYJSON_READ_ALLOW_SINGLE_QUOTED_STR to support single-quoted strings, such as 'ab'.
- Add YYJSON_READ_ALLOW_UNQUOTED_KEY to allow unquoted keys, such as {a:1,b:2}.
- Add YYJSON_READ_JSON5 to enable full JSON5 support.
Changed
0.11.1 (2025-05-14)
Fixed
- Fix errors when unaligned access is disallowed (no impact if your build was already successful).
0.11.0 (2025-05-05)
Added
Changed
- Rewrite the floating-point number to string functions with a new fast path.
- When comments are allowed, return UNEXPECTED_END instead of INVALID_COMMENT for unclosed comments.
- Truncated escape sequences now report the error position at the sequence start rather than the end.
Fixed
- Fix some warnings when directly including yyjson.c: #177
- Fix missing indent for YYJSON_TYPE_RAW in prettify function: #178
- Fix bug in yyjson_mut_arr_iter_remove(): #194
- Fix clang 19 documentation warnings.
- Fix cmake 4 and cmake 3.5 warnings.
0.10.0 (2024-07-09)
Added
Changed
- Improve error messages for JSON reader: #168
Fixed
0.9.0 (2024-04-08)
Added
Changed
- Add auto-type conversion (uint<->sint) to yyjson_ptr_get_uint/sint(): #152
Fixed
- Fix incorrect output in environments lacking native bool type support: #161
0.8.0 (2023-09-13)
Added
Changed
Fixed
- Fix clang-16 valgrind fail: #134
- Fix compile break when both FAST_FP and READER are disabled
0.7.0 (2023-05-25)
Added
- Add YYJSON_WRITE_PRETTY_TWO_SPACES option to allow 2 spaces instead of 4 spaces when writing pretty JSON: #99
- Add YYJSON_READ_BIGNUM_AS_RAW option to read big numbers as raw strings: #124
- Add yyjson_get_num() function to convert and return any number value as double: #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() and ptr_remove().
- Add support for JSON Patch (RFC 6902).
Changed
- BREAKING CHANGE: Change the allocator's realloc function signature, add old_size parameter for custom allocator: #100
- BREAKING CHANGE: Change yyjson_read_number() function, add alc parameter.
- DEPRECATED: Deprecate get_pointer() functions, rename to ptr_get().
- Improve performance of yyjson_mut_write() function.
Fixed
- Fix inaccurate error code for truncated JSON: #103
0.6.0 (2022-12-12)
Added
Fixed
- Fix quite NaN on MIPS and HPPA arch.
- Fixed compile error before GCC 4.5, which doesn't support empty optional extended asm label.
- When the built-in floating point conversion is disabled, the sprintf() output for floating point numbers is missing a decimal point, for example 123 should be 123.0.
0.5.1 (2022-06-17)
Fixed
- Fix run-time error when compiling as cpp and 32-bit (g++-5 -m32 -fPIC) #85
- Fix incurrect output number format, remove unnecessary digits (e.g. 2.0e34 -> 2e34).
0.5.0 (2022-05-25)
Added
Changed
- Change yyjson_mut_obj_remove() return type from bool to yyjson_mut_val *.
- Rewrite string serialization function, validate unicode encoding by default.
- Rewrite the JSON Pointer implementation, remove internal malloc() calls.
Fixed
- Make the code work correctly with setlocale() function and -ffast-math flag: #54
- Fix negative infinity literals read error: #64
- Fix non null-terminated string write error.
- Fix incorrect behavior of YYJSON_DISABLE_NON_STANDARD flag: #80
0.4.0 (2021-12-12)
Added
Changed
- Replace YYJSON_DISABLE_COMMENT_READER and YYJSON_DISABLE_INF_AND_NAN_READER with YYJSON_DISABLE_NON_STANDARD compile-time flag.
- Replace YYJSON_DISABLE_FP_READER and YYJSON_DISABLE_FP_WRITER with YYJSON_DISABLE_FAST_FP_CONV compile-time flag.
Fixed
- Fix compiler warning with -Wconversion
- Fix compiler error for GCC 4.4 (#53) and MSVC 6.0 (#55)
0.3.0 (2021-05-25)
Added
- Add JSON Pointer support.
- Add CMake install target.
Changed
- Improve performance for some architectures that don't support unaligned memory access.
Fixed
- Fix some compiler warnings for GCC and Clang.
- Fix MSVC build error on UWP (uninitialized local variable).
- Fix stream file reading error on some platforms.
0.2.0 (2020-12-12)
Added
- Add swift package manager support.
Changed
- Improve JSON reader performance for gcc.
- Improve double number reader performance with a fast path.
- Rewrite double number writer with Schubfach algorithm: #4.
- Strict UTF-8 validation for JSON reader.
Removed
- Remove YYJSON_READ_FASTFP compile-time flag.
Fixed
- Fix a compile error for old version gcc on linux: #7.
0.1.0 (2020-10-26)
Added
- Initial release.
- Add the basic JSON reader and writer (RFC 8259).
- Add CMake support.
- Add GitHub CI workflow.
- Add test code and test data.
- Add sanitizer and valgrind memory checker.
- Add API and DataStructure documentation.