Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!
Now, what are you waiting for? Join the community now!
SkJson 6.0.0 — HTTP reliability and core JSON
SkJson 6.0.0 builds on the 5.6 baseline and focuses on outgoing HTTP reliability and core JSON path APIs.
[!IMPORTANT]
SkJson 6.0.0 requires Skript 2.15.0 or newer. It will not load on Skript 2.14 or older.
[!NOTE]
SkJson handles outgoing HTTP requests (execute {_request} / on received http response). It does not provide an embedded web server or incoming request syntax such as reply … with ….
---
Requirements
| | |
| --- | --- |
| Java | 21+ (CI: 25) |
| Minecraft | 1.16.5+ (CI: Paper 26.2) |
| Skript | 2.15.0+ (tested with 2.15.4) |
| Optional | NBT-API (shaded in jar) |
Recommended stack: Paper 1.21.x+, Java 21+, Skript 2.15.4+.
---
What's new in 6.0.0
HTTP module
- Query parameters — key:value pairs support values that contain colons; multiple add "key:value" to query params of {_req} calls compose correctly
- MOCK method — prepare MOCK request on … returns a local synthetic 200 response ({"mock":true}) without a network call (blocking and non-blocking)
- Full method coverage — GET, POST, PUT, PATCH, DELETE, HEAD, MOCK, plus json from website
- Non-blocking requests — execute {_req} as non blocking with on received http response
- Configurable client — shared HTTP client with connect/response timeouts and thread pool in config.yml
Recommended syntax for multiple query params:
Code:reset query params of {_req} add "skjson:demo" to query params of {_req} add "probe:1" to query params of {_req} set {_req}'s headers to json from "{'Accept':'application/json','X-Test':'ok'}"
Core JSON
- set value at path … in … to … — dedicated path write effect
- remove path … from … / delete path … in … — delete nested keys without rebuilding the document
- .jsonc files — line/block comments and trailing commas stripped before parse
- Performance — fast-path primitive parsing, bounded path token cache, NBT conversion LRU cache (configurable in config.yml)
---
Bug fixes (since 5.6.0)
HTTP
- Query params — multiple key:value pairs no longer collapse into one broken URL key. Prefer adding parameters one at a time:
Code:reset query params of {_req} add "skjson:demo" to query params of {_req} add "probe:1" to query params of {_req}
- MOCK requests — prepare MOCK request on … followed by execute {_req} returns local JSON without opening a socket:
Code:set {_req} to prepare MOCK request on "https://example.com/status" execute {_req} set {[i]res} to last response of {[/i]req}
- HEAD responses — prepare HEAD request on … / execute {[i]req} correctly yields an empty body; do not assume %body of {[/i]res}% is JSON.
Syntax and behaviour
- set value at path … in … to … — path writes use a dedicated effect instead of slower generic setters
- remove path … from … / delete path … in … — nested keys can be removed without rebuilding the whole document
- has path / contains path — probing a missing key does not spam warnings to the console
- loop values of {_json}: — iterates object/array entries (%json-key-1%, %json-value-1%), not a single wrapped value
- .jsonc files — json from file and bind/watch flows accept .jsonc like .json
Performance bottlenecks
- JSON primitives — parse "…" as json and numeric/boolean literals skip unnecessary Gson round-trips on the hot path
- Path reads — repeated value at path "…" in {[i]json} / path "…" of {[/i]json} reuse a bounded path-token cache (size in config.yml) instead of re-tokenizing every access
- Array index paths — value at path "items.0.name" in {_json} resolves array segments with integer parsing; read mode no longer mis-navigates array indices
- Path writes — set value at path "…" in {_json} to … avoids extra allocation in high-frequency update loops
- Object key pickers — last key of {_json} and indexed/random key access no longer copy entire entry sets on each call
- File watcher — bind/watch reload compares compact snapshots (hash before full string equality) so unchanged saves do not trigger redundant cache refresh
- File I/O — JSON serialization for disk writes reuses a shared serializer instance instead of creating one per write
- NBT conversion — optional NBT → JSON uses an LRU cache (size in config.yml) to cut repeat conversion cost on items, chunks, and entities
---
Examples
Code:[SIZE=7]--- HTTP GET with query params ---[/SIZE] set {_req} to prepare GET request on "https://api.example.com/get" reset query params of {_req} add "skjson:demo" to query params of {_req} add "probe:1" to query params of {_req} set {_req}'s headers to json from "{'Accept':'application/json'}" execute {_req} set {[i]res} to last response of {[/i]req} set {[i]body} to parse "%body of {[/i]res}%" as json send "args: %value at path ""args"" in {_body}%" to player [SIZE=7]--- MOCK (no network) ---[/SIZE] set {_req} to prepare MOCK request on "https://example.com/get" execute {_req} set {[i]res} to last response of {[/i]req} assert status code of {_res} is 200 [SIZE=7]--- Async ---[/SIZE] set {_req} to prepare GET request on "https://api.example.com/status" execute {_req} as non blocking on received http response: set {_res} to event-response broadcast "API status: %status of {_res}%" [SIZE=7]--- Path write / remove ---[/SIZE] set {_cfg} to json from "{user: {name: ""Alex""}}" set value at path "user.name" in {_cfg} to "Bob" remove path "user.role" from {_cfg}
---
Upgrade guide (from 5.6.0)
1. Replace skjson.jar in plugins/ (keep a single copy — duplicate jars cause load warnings).
2. Restart the server (recommended after any SkJson update).
3. If you use HTTP query params, prefer add "key:value" to query params of {[i]req} instead of comma/and lists on set query params of {[/i]req}.
4. Enable HTTP in plugins/SkJson/config.yml if needed: enabled-http: true.
---
Install
1. Download skjson.jar from the release assets below.
2. Place it in plugins/ (Skript 2.15+ must already be installed).
3. Restart the server.
4. Review plugins/SkJson/config.yml (HTTP, NBT, watcher, cache sizes).
---
Project links
| Resource | Link |
| --- | --- |
| Wiki | github.com/cooffeeRequired/skJson/wiki |
| Issues | github.com/cooffeeRequired/skJson/issues |
| Performance notes | performance.md |
---
Full Changelog: 5.6.0...6.0.0
SkJson 5.6.0 — Back from archive · Skript 2.15 migration
After a long pause, SkJson has been unarchived on GitHub and this release marks the return of the project. Active development is resuming — bug reports, feature requests, and pull requests are welcome again.
This build is the first maintained release after 5.4.1 (August 2025). It brings the addon in line with Skript 2.15, ships the 5.5 feature set that never received a stable tag, and includes a full round of CI fixes so the custom test suite passes on current Paper builds.
Important: SkJson 5.6.0 requires Skript 2.15.0 or newer. It will not load on Skript 2.14 or older (missing SyntaxRegistry / EventValueRegistry). Plan an upgrade of Skript before updating SkJson.
---
Why this release exists
Skript moved its registration APIs in 2.15. SkJson needed a proper migration away from legacy addon hooks, plus regression fixes for loops, English syntax aliases, virtual JSON cache, and converter registration. While the repository was archived, those changes were prepared but not published as a stable release — 5.6.0 closes that gap.
Going forward, the goal is to keep SkJson compatible with current SkriptLang nightlies/stable builds and modern Paper versions, with CI running on every push to main.
---
Requirements
| | |
|---|---|
| Java | 21+ |
| Minecraft | 1.16.5+ (CI: Paper 26.1.1) |
| Skript | 2.15.0+ (tested with 2.15.2) |
| Optional | NBT-API (shaded in jar) |
Recommended stack for new servers: Paper 1.21.x+, Java 21+, Skript 2.15.2+.
---
What's new in 5.6.0
Skript 2.15 migration
- All syntax registered through SyntaxRegistry; event values through EventValueRegistry
- Clear startup behaviour: SkJson disables itself if Skript 2.15 APIs are not present (no half-loaded state)
- Updated build dependencies: Paper API 1.21.11, Gson 2.14, Shadow 9.2.2, NBT-API 2.15.6
- GitHub Actions: tests run against Skript 2.15.2 built from source on JDK 25
Syntax & features (5.5 + 5.6)
- Natural English aliases — read and write JSON in more intuitive Skript:
- parse … as json, value at path … in, values at path … in
- json cache, create a virtual json cache named …
- merge … into … / merge … into … deeply
- remove path / delete path, has path / contains path
- json size of, path … of, compact/pretty JSON output
- deep copy of {_json} — duplicate JSON trees without mutating the original
- has path / contains path — check whether a dot-path exists before reading
- Shallow & deep merge — patch objects into a base document (deeply for nested merge)
- JSON loops — iterate structure with custom loop types:
- loop values of {_json}: → %json-key-1%, %json-value-1%
- Nested loops supported (%json-key-2%, etc.)
- HTTP module (unchanged scope) — still bundled for JSON-encoded requests/responses
Performance & reliability
- Bounded path token cache — faster repeated access to the same paths
- Improved resolve / resolveParsed and quieter path existence checks
- Safer merge and navigation edge-case handling
- Converter scope tightened — JsonElement is no longer auto-converted to World / Chunk, which previously caused save json cache to be parsed as save worlds and similar conflicts with vanilla Skript
---
Examples
Code:[SIZE=7]Parse and inspect[/SIZE] set {_json} to parse "{""enabled"": true, ""count"": 3, ""tags"": [""a"", ""b""]}" as json assert {_json} is a json object assert {_json} has path "enabled" assert value at path "enabled" in {_json} is true [SIZE=7]Deep copy — original stays intact[/SIZE] set {[i]copy} to deep copy of {[/i]json} set value "count" of {_copy} to 99 assert value "count" of {_json} is 3 [SIZE=7]Merge configs[/SIZE] set {_base} to json from "{nested: {x: 1, inner: {p: 1}}}" set {_patch} to json from "{nested: {y: 2, inner: {q: 2}}}" merge {[i]patch} into {[/i]base} deeply [SIZE=7]Loop keys/values at root or nested path[/SIZE] set {_data} to json from "{users: {alice: {score: 10}, bob: {score: 20}}}" loop values of {_data}: broadcast "key: %json-key-1%" [SIZE=7]Virtual cache (in-memory)[/SIZE] create a virtual json cache named "my-data" assert json cache "my-data" exists
---
Bug fixes (since 5.4.1)
- json is empty — correct behaviour for all registered empty-check patterns (including English aliases)
- Deep merge — deeply flag on merge … into … is respected
- File watcher — bind/unbind modes for storage watchers
- loop values of {_json} — iterates object/array entries, not a single wrapped value
- save json cache — no longer clashes with Skript's save worlds
- Type conditions — is a json array/object parses correctly on Skript 2.15
- values vs value — plural patterns registered before singular ones; safe init() with optional pattern slots
- CI — full custom test suite green on Paper 26.1 + Skript 2.15.2
---
Upgrade guide (from 5.4.x)
1. Upgrade Skript to 2.15+ first, then replace skjson.jar with this release.
2. Reload or restart the server (full restart recommended after Skript major bump).
3. Re-test scripts that use:
- loop values of …
- save json cache / virtual cache syntax
- size of on JSON → prefer json size of {_json}
4. If you relied on automatic JsonElement → World conversion, use explicit Skript/API handling instead (that converter was removed intentionally).
---
Install
1. Download skjson.jar from the assets below.
2. Place it in plugins/ (Skript 2.15+ must already be installed).
3. Restart the server and review plugins/SkJson/config.yml if you use watchers or auto-update settings.
---
Project status & where to get help
| Resource | Link |
|----------|------|
| Wiki | https://github.com/cooffeeRequired/skJson/wiki |
| Discord | https://discord.gg/dsZq5Cs9fd |
| Issues | https://github.com/cooffeeRequired/skJson/issues |
| Performance notes | https://github.com/cooffeeRequired/skJson/blob/main/performance.md |
Active development is back. Upcoming work will focus on staying current with Skript releases, expanding tests, and addressing community feedback. If you depended on SkJson while the repo was archived — thank you for your patience; this release is meant to be a dependable baseline again.
---
Full Changelog: https://github.com/cooffeeRequired/skJson/compare/5.4.1...5.6.0
️ SkJson 5.4 — Debug changes, Custom loops and better get/set syntax
---
New Features & Improvements
---
Bug Fixes
---
View full diff between 5.3 and 5.4
Thank you for your continued support and valuable feedback!
This release introduces major improvements focused on data handling precision, performance, and resilience.
---
New Features & Improvements
- Parser Overhaul
The internal parser has been fully rewritten to improve deserialization speed and correctness. All conversions now respect Bukkit’s ConfigurationSerializable contract for better integration with native types.
- Automatic Dependency Removal for File Watchers
Added smart cleanup logic: if a watched file no longer exists, its reference is now removed automatically, preventing unnecessary log spam and improving runtime clarity.
- Improved Unicode Support
Added full support for special characters like ä, ü, ö, ß, and similar, ensuring compatibility with a wider range of languages and inputs.
- Fallback Support Introduced
The first fallback module is now available:
Download SkJson4x-fallback 4x
To enable fallback support:
1. Set enabled-fallback: true in your SkJson/config.yml.
2. Download the fallback .fallback file from the release above.
3. Place the file into your server directory: SkJson/libraries/.
---
Bug Fixes
- Data Integrity
Fixed several issues that could lead to invalid or corrupted JSON during serialization/deserialization.
- Type-Specific Fixes
Resolved incorrect behavior with now, date, skript date, and timespan types during serialization and deserialization.
- Adapter Cleanup
Deprecated and removed legacy adapters such as BukkitSerializableAdapter and GenericFlatObjectAdapter in favor of the new unified parsing system.
---
View full diff between 5.1.2 and 5.2
Direct commit diff – 58404d0
Thank you for your continued support and valuable feedback!
SkJson 5.2 – Enhancements & Changes
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:
- Path-based syntax examples:Code:# 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
- New Fallback SystemCode:# 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 {[i]value} to json value "x.y" of {[/i]json} set {[i]values::*} to json values "x.y" of {[/i]json} # REMOVE ALL & RESET remove all 1 from json values "x.y" of {_json} reset json array "x.y.z" of {_json}
- 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:
Code: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!
SkJson 5.1.2 – Enhancements
This update brings significant improvements and fixes, enhancing stability and extending compatibility with different server platforms.
New Features & Improvements
* Allow disable auto-updater: Now you can by config enabled-auto-updater: true disable auto updater of SkJson
* Add new feature: sorted json:
%jsonelement% [sorted] in (:ascending|:descending) order by (:key|:value)
Code:set {_json} to json from "{c: A, b: 2, a: test}" send {_json} in descending order by key to console send {_json} in ascending order by key to console send {_json} in descending order by value to console send {_json} in ascending order by value to console
For a detailed view of changes, please see the diff between 5.1.1a and 5.1.2.
Thank you for your continued support and feedback!
Full Changelog: https://github.com/cooffeeRequired/skJson/compare/5.1...5.1.1
Fix (response|request) body/headers.
- Thank you @Fusezion..
- Rewroten to SimplePropertyExpression
Full Changelog: https://github.com/cooffeeRequired/skJson/compare/5.0...5.1
Resolved issues https://github.com/cooffeeRequired/skJson/issues/127
SkJson 5.0
Core Features
- Support for Java 21+
- Compatible with Minecraft 1.16.5+
- Integration with Skript 2.9.2+
Key Improvements
• Enhanced MemoryCache System
- Read/Write speed: 100–1000 μs
- Optimized in-memory storage
• Extended Format Support
- Native support for `.json` files
- Preparation for `.jsonc` (JSON with comments)
• Advanced Serialization
- Full NBT support via NBT-API
- Extended Bukkit object serialization:
- Location
- Player
- Entity
- Inventory
- and more...
Rewritten Features
• FileWatcher System
- Automatic JSON file change monitoring
- Instant cache updates on file change
- Perfect for dynamic files (e.g., `ops.json`)
• VirtualCachedJson
- Dynamic storage for script variables
- Flexible in-memory data management
• HTTP Integration
- HTTP request support
- JSON response encoding
- Enhanced API communication capabilities
️ Technical Improvements
- Optimized build system
- Improved documentation
- Extended server support: Spigot, Paper, Purpur
Documentation
- Updated Wiki
- New usage examples
- Extended tutorials
Fixes
- Performance optimizations
- Improved stability
- Resolved known issues