Skip to content

SkJson 5.6.0 — Back from archive · Skript 2.15 migration

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 26 May 23:31
· 4 commits to main since this release

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

# Parse and inspect
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

# Deep copy — original stays intact
set {_copy} to deep copy of {_json}
set value "count" of {_copy} to 99
assert value "count" of {_json} is 3

# Merge configs
set {_base} to json from "{nested: {x: 1, inner: {p: 1}}}"
set {_patch} to json from "{nested: {y: 2, inner: {q: 2}}}"
merge {_patch} into {_base} deeply

# Loop keys/values at root or nested path
set {_data} to json from "{users: {alice: {score: 10}, bob: {score: 20}}}"
loop values of {_data}:
    broadcast "key: %json-key-1%"

# Virtual cache (in-memory)
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
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: 5.4.1...5.6.0