Releases: ProjectSky/sm-ext-json
Release list
Rebuild to match V9 extension API
Merge pull request #11 from Mikusch/main Build against both SourceMod 1.12 (API v8) and 1.13 (API v9)#
1.1.5e
Release 1.1.4a
refactor: reduce code duplication and fix documentation
Code Refactoring:
- Add CreateAndReturnHandle helper for direct return functions
- Add CreateAndAssignHandle helper for output parameter functions
Fixes:
- Fix json_doc_write_to_str off-by-one error in return value
- Fix json_val_get_read_size to correctly add null terminator
CI:
- Deprecate pushbuild.txt trigger method
Release 1.1.4
feat: Implement IYYJSONManager interface for external extensions (implements #6)
Add utility methods to make the interface more
convenient for external C++ extensions (WebSocket, HTTP, etc.).
Changes:
-
Add new interface methods for external extensions:
- Release(YYJSONValue*): safely release JSON value objects
- GetHandleType(): get YYJSON handle type for cross-extension access
- GetFromHandle(): read YYJSONValue from SourceMod handle
- ...
-
Update yyjson library to version 0.12.0
-
Fix handle permissions to allow cross-extension read access:
- Set HandleAccess_Read = 0 in extension.cpp
These improvements enable external extensions to:
- Use more concise API calls with sensible defaults
- Access JSON handles across extension boundaries
- Safely manage YYJSONValue object lifetime
- Avoid dependency on YYJSON extension internals
All changes are backward compatible. Existing code continues to work
without modification.
Release 1.1.3
feat: enhance JSON pointer error messages with path info
- Add path parameter to all JSON pointer error messages
- Update yyjson library to version 0.11.1
- Improve debugging experience by showing exact path in error logs
Release 1.1.2rc
fix: correct path resolution in deep copied JSON documents (fixes #4)
When creating a new document from a subtree using DeepCopy, paths were not
resolving correctly because the copied value was not properly set as the root
of the new document.
Changes:
- Add
yyjson_mut_doc_set_rootcall in json_doc_copy_deep - Ensure copied value becomes the new document root
- Fix path resolution relative to new root
This fixes issues where JSON pointer operations (Ptr* functions) were not
working correctly on deep copied subtrees, as they were still referencing
the original document structure instead of treating the copied value as
the new root.
vendor: update yyjson to latest and add fp comparison patch
-
Update yyjson library to latest version
- Update third_party/yyjson/yyjson.h
- Update third_party/yyjson/yyjson.c
- Sync with upstream changes and improvements
-
Apply floating-point comparison patch:
- Add new API functions in yyjson.h:
yyjson_equals_fpCompare with default epsilon valuesyyjson_equals_fp_customCompare with custom epsilon values- Implement functions in yyjson.c
- Update
unsafe_yyjson_num_equalsto use new comparison logic
The patch improves floating-point comparison accuracy by using both
relative and absolute epsilon values to handle edge cases.
Patch file: third_party/yyjson/add-floating-point-equality-comparison.patch
Release 1.1.2a
fix: json value pack and doc parse issues
- Fix missing root value setting in json_val_pack
- Fix incorrect read flag parameter in json_doc_parse (fixes #3)
docs: Update comments in yyjson.inc for better clarity and consistency
- update JSON parsing error handling and improve documentation
Release 1.1.2
feat: add PtrTry* functions (implements #2)
- Add PtrTry* functions that similar to PtrGet* but don't throw exceptions on failure, allowing for manual exception handling
- Replace custom sorting with std::shuffle for better randomization
- *GetInt64 functions now use signed integers
- Add type checking methods: IsUint, IsSint, IsNum, IsTrue, IsFalse, IsCtn
- Add immutable doc support for YYJSON.Get* functions
fix: add buffer size checks for GetString functions (fixes #1)
- Fix Windows compilation warnings (C4244, C4267) using static casts
- Fix *GetString functions to properly check buffer size, now throw exceptions with required size info
- Fix *GetLength functions to correctly calc for null terminators
docs: improve documentation and comments
Release 1.1.1
feat: add Pack and FromStrings features
Add two new features for JSON manipulation:
- Pack: create JSON with format string and values
- FromStrings: create JSON from string arrays
Implementation includes:
- Add Pack function for format string parsing
- Add FromStrings methods for Object and Array
- Add test cases in yyjson_test.sp
- Add usage examples in README.md
Release 1.1.0
ver 1.1.0
fix: fix float comparison and update yyjson
-
Fix float comparison in Equals function
- Uses epsilon comparison for reliable float equality checks
-
Update yyjson to latest version
- See yyjson changelog for details
-
Documentation improvements
- Clarify JSON Pointer usage
-
Minor code improvements
- Remove redundant areClose function
- Update float comparison in array functions