Skip to content

Releases

SkJson 6.0.0 — HTTP reliability and core JSON

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 04 Jul 08:38

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:

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:

    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:

    set {_req} to prepare MOCK request on "https://example.com/status"
    execute {_req}
    set {_res} to last response of {_req}
  • HEAD responses — prepare HEAD request on … / execute {_req} correctly yields an empty body; do not assume %body of {_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 {_json} / path "…" of {_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

# --- HTTP GET with query params ---
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 {_res} to last response of {_req}
set {_body} to parse "%body of {_res}%" as json
send "args: %value at path ""args"" in {_body}%" to player

# --- MOCK (no network) ---
set {_req} to prepare MOCK request on "https://example.com/get"
execute {_req}
set {_res} to last response of {_req}
assert status code of {_res} is 200

# --- Async ---
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}%"

# --- Path write / remove ---
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 {_req} instead of comma/and lists on set query params of {_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

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 26 May 23:31

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

SkJson 5.4.1 — Fix POST Request body (related to mc > 1.20)

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 13 Aug 22:49

Full Changelog: 5.4...5.4.1

command /test:
    trigger:
        set {_request} to prepare POST request on "127.0.0.1:8081/200"
        set {_request}'s header to "Content-Type: application/json"
        set {_request}'s body to json from "{'content': 'discord test'}"
        execute {_request}

🛠️ SkJson 5.4 — Debug changes, Custom loops and better get/set syntax

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 15 May 21:17

🚀 New Features & Improvements

  • Added support for custom loops
  • Improved get/set operation syntax
  • Added new walkAsFiles method for traversing JSON files
  • Refactored SerializedJson to JsonAccessor for better JSON data access
  • Enhanced support for working with JSON arrays and objects
  • Added better support for JSON loops
  • Added support for AbstractLoops with improved parsing and validation system
  • New implementation for working with nested loops in JSON data
  • Enhanced system for working with loop-indices and loop-keys

Example of AbstractLoopExpression Usage

Java Implementation Example

// Example of custom loop implementation
public class CustomAbstractLoop extends AbstractLoopExpression<Object> {
    private LoopState state;

    public enum LoopState {
        ID, VALUE, KEY, INDEX
    }

    @Override
    public boolean isIntendedLoop(AbstractLoop loop, AbstractExpressionInitializer initializer) {
        if (loop.getLoopedExpression() instanceof CustomExpression exprCustom) {
            switch (initializer.parser().mark) {
                case 1 -> state = LoopState.KEY;
                case 2 -> state = LoopState.VALUE;
                case 5 -> state = LoopState.INDEX;
            }
            return true;
        }
        return false;
    }

    @Override
    public Class<?> getExpressionToLoop() {
        return Expression.class;
    }

    @Override
    public Object[] get(Event event) {
        Object current = loop.getCurrent(event);
        if (current == null) return null;
        return current;
    }
}

🐛 Bug Fixes

  • Fixed issues with accessing JSON data in loops
  • Improved null value checking in JSON data
  • Fixed issues with accessing indices in JSON arrays
  • Enhanced JSON data validation during parsing
  • Fixed issues with nested loops
  • Improved error detection and handling in loop expressions
  • Fixed issue with request body without defined http version
  • Fixed variable parsing in literal
  • Fixed conflicts with Skript-reflect lately.

🔍 View full diff between 5.3 and 5.4

Thank you for your continued support and valuable feedback!

🛠️ SkJson 5.3 — Parser Rewrite, Bug Fixes & Encoding Support

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 10 May 19:51
58404d0

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.3
🔗 Direct commit diff – 58404d0

Thank you for your continued support and valuable feedback!

🧩 SkJson 5.2 – Enhancements & Changes !Fallback

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 09 May 16:35

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!

5.1.2

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 08 May 19:43

🧩 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)

 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!

Fix requests 5.1.1a

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 05 May 15:07

🧩 SkJson 5.1.1a – Enhancements & Bug Fixes

This update brings significant improvements and fixes, enhancing stability and extending compatibility with different server platforms.

🚀 New Features & Improvements

  • Expanded Server Support: Added detection and support for Leaf servers, broadening plugin compatibility.
  • Enhanced Debugging Output: Improved details provided during JSON object and array manipulation for easier diagnostics.
  • Improved Error Handling: Added warnings for unsuccessful lookups of keys or indexes within JSON structures.
  • API Extension: Introduced the isClassAvailable(String) method to verify the availability of classes by name.
  • Build Script Adjustments: Modified test configuration for improved compatibility with Windows environments.

🐛 Bug Fixes

  • HTTP Request and Response Fixes: Addressed issues related to HTTP request and response bodies and headers. Thank you @Fusezion
  • Metrics Optimization: Moved bStats metrics initialization into onEnable() to ensure proper loading.

📄 Documentation

  • Wiki Link Updated: Corrected the Wiki link in README.md for easier access to documentation.

For a detailed view of changes, please see the diff between 5.0 and 5.1.1a.

Thank you for your continued support and feedback!

Small Fix 5.1

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 03 May 19:52

Full Changelog: 5.0...5.1

Resolved issues #127

SkJson 5.0 - API Changes

Choose a tag to compare

@cooffeeRequired cooffeeRequired released this 23 Apr 21:50

SkJson 5.0

🎯 Core Features

  • Support for Java 21+
  • Compatibility with Minecraft 1.16.5+
  • Integration with Skript 2.9.2+

💡 Key Improvements

  • Enhanced MemoryCache System

    • Read/Write speed: 100-1000 μs
    • Optimized memory storage
  • Extended Format Support

    • Native support for .json files
    • Preparation for .jsonc support (JSON with comments)
  • Advanced Serialization

    • Full NBT support via NBT-API
    • Extended Bukkit object serialization
      • Location
      • Player
      • Entity
      • Inventory
      • and more

🔄 Rewriten Features

  • FileWatcher System

    • Automatic JSON file change monitoring
    • Instant cache updates on changes
    • 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
  • Enhanced documentation
  • Extended server support:
    • Spigot
    • Paper
    • Purpur

📚 Documentation

  • Updated Wiki
  • New usage examples
  • Extended tutorials

🐛 Fixes

  • Performance optimization
  • Stability improvements
  • Known issues resolution

What's Changed

Full Changelog: 4.0.5...5.0