Repository navigation
π§© SkJson 5.2 β Enhancements & Changes !Fallback
Pre-release
Pre-release
This update brings significant improvements and fixes.
π New Features & Improvements
- Added support for sorting JSON objects and arrays
- Ability to sort in ascending or descending order by key or value
- New syntax:
{_json} in ascending/descending order by key/value
- Enhanced HTTP request and response handling
- New properties for working with request and response bodies
- Improved header management
- Extended file handling support
- Improved file change watching
- New configuration options when creating files
- Complete Changer Support
- Added full support for both literal and path-based syntax
- Literal syntax examples:
# SET set {_json}.list to "[]" set {_json}.object to "{}" set {_json}.object.key to "value" # ADD add 40 and "K" to {_json}.list add location(0, 0, 0) to {_json}.list # REMOVE remove 1 and 40 from {_json}.list remove "value" from {_json}.object # DELETE delete {_json}.object delete {_json}.list[0] # GET send {_json}.list.0 send {_json}.object.key # REMOVE ALL & RESET remove all 1 from {_json}.list reset {_json}.object
- Path-based syntax examples:
# SET set json value "x.y" of {_json} to 1 set json values "x.y" of {_json} to 2, 3 and 4 # ADD add 10 to json array "x.y.z[]" of {_json} add 20 and 30 to json array "x.y.z" of {_json} # REMOVE remove 10 from json array "x.y.z" of {_json} remove "lol" from json array "x.y.z" of {_json} # DELETE delete json value "x" of {_json} delete json values "x.y" of {_json} # GET set {_value} to json value "x.y" of {_json} set {_values::*} to json values "x.y" of {_json} # REMOVE ALL & RESET remove all 1 from json values "x.y" of {_json} reset json array "x.y.z" of {_json}
- New Fallback System
- Added support for legacy versions through fallback system
- Automatic loading of compatible fallback modules
- Configurable fallback settings in
libraries/configuration.properties - Features:
- Minimum version support configuration
- Automatic fallback detection
- Retry mechanism for failed operations
- Timeout settings
- Legacy compatibility mode
- Backward Compatibility:
- Seamless support for older syntax versions
- No performance impact when using legacy syntax
- Automatic detection and handling of deprecated features
- Smooth transition path for existing scripts
- Configuration options:
version.current=${version} version.minimum.supported=4.x version.fallback.enabled=true version.jar.fallback=skjson.legacy fallback.retry.attempts=3 fallback.timeout.ms=5000 compatibility.mode=auto compatibility.legacy.support=true
π Bug Fixes
- Fixed issues with JSON data saving
- Improved stability when working with large JSON files
- Fixed encoding issues when working with files
- Enhanced compatibility with different Skript versions
For a detailed view of changes, please see the diff between 5.1.2 and 5.2.
Thank you for your continued support and feedback!