• Welcome to skUnity!

    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 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 tightenedJsonElement 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 mergedeeply 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 conditionsis 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 JsonElementWorld 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:
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
- Path-based syntax examples:
Code:
    # 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}
- 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:
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
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


What's Changed
* Updated documentation by @EnolaK64 in https://github.com/cooffeeRequired/skJson/pull/105
* feat: finish json handler/serializer - remover, changer, setter, getter, counter by @cooffeeRequired in https://github.com/cooffeeRequired/skJson/pull/111
* Features/skript syntaxes 4.1 by @cooffeeRequired in https://github.com/cooffeeRequired/skJson/pull/113
* Features/skript syntaxes 4.1 by @cooffeeRequired in https://github.com/cooffeeRequired/skJson/pull/114
* feat: finish changer. by @cooffeeRequired in https://github.com/cooffeeRequired/skJson/pull/116
* 4.5/requests by @cooffeeRequired in https://github.com/cooffeeRequired/skJson/pull/117
* feat: testing edge by @cooffeeRequired in https://github.com/cooffeeRequired/skJson/pull/118
* 4.5 long term changes by @cooffeeRequired in https://github.com/cooffeeRequired/skJson/pull/119
* Tests by @cooffeeRequired in https://github.com/cooffeeRequired/skJson/pull/121
* Features/new logger by @cooffeeRequired in https://github.com/cooffeeRequired/skJson/pull/120

Skript syntax's changes for few nodes

Key notes
- rewriten whole skJson
- new features as like configuration for file

New Contributors
* @EnolaK64 made their first contribution in https://github.com/cooffeeRequired/skJson/pull/105

Full Changelog: https://github.com/cooffeeRequired/skJson/compare/4.0.1...4.5