Skip to content

Releases: cooffeeRequired/skJson

skJson 2.6.0 - HotFixed mirror issues

22 Jan 18:26
Compare
Choose a tag to compare

skJson 2.6.0⚠️

Introduce 🟢

Hello everyone.
Hotfixed issue #9 , also the #10

Please check SkriptHub or Wikipedia for syntax changes.

❌ If you found any bugs, feel free to post it.

Sincerely, Coffee. 👋

Full Changelog: 2.5.9...2.6.0

skJson 2.5.9 (Fixed Changer!)

21 Jan 12:40
Compare
Choose a tag to compare

skJson 2.5.9 ⚠️

Introduce 🟢

Hello everyone.
Fixed changers, for json you are now able to remove/add or set objects even with cached json.
Added removing/setting for nested objects

This error was related to this thread #8

Version 2.5.9

Example

on load:
    set {_json} to json from string "{'A': [1,2,3,4,{'B':false}]}"
    set json value "A[1]" of {_json} to true
    
    # Before {"A":[1,2,3,4,{"B":false}]}
    
    remove json value "A[4]:B" from {_json}
    add values 1,2,3,4 to {_json}
    send {_json}
    
    # After {"A":[1,2,3,4,{}]}

    load json file "try3.json" as "try"
    send cached json "try"
    set json value "A[0]" of cached json "try" to true
    send cached json "try"

Please check SkriptHub or Wikipedia for syntax changes.

❌ If you found any bugs, feel free to post it.

Sincerely, Coffee. 👋

Full Changelog: 2.5...2.5.9

skJson 2.5 (Sanitized, Renamed, Fixed performance)

20 Jan 13:32
Compare
Choose a tag to compare

skJson 2.5 ⚠️

Introduce 🟢

Hello everyone.
This is a big milestone for skJson addon (skript-gson)
One of the first pieces of information is that it has been renamed from the current skript-gson to skJson. I renamed this addon because the gson in the name said little to anyone and was not as representative. thus skJson contains both json in the word and Skript (sk)

I should also mention that support for older versions of minecraft server has been added. Since version 1.8.8 this addon is able to work.

I must also mention that the kernels for file handling and json serialization have been redesigned. For example, you can now serialize nbt and or entities.

A lot of syntax has been modified and simplified. one of my favorites is the Append effect, here is an example
append player's tool with key uuid of player as nested object "data:players tools[1]" to json file "..."
Don't worry I'll show you everything here, the new syntax is more intiative and I hope you'll find it easier to work with this addon, at the moment the addon supports around 24/25 data-types, if you want to add some that isn't just create a github thread as suggestion and I'll be happy to take a look.

I would also like to thank the total number of support and downloads for this addon and that is 4129x to date.

Alright let's get on with the news.

News 🟢

Adapters ⏺️

NBT, Entity, Chunk, ItemStack, World, Inventory, bukkit-types, and some Skript-types.

Please check SkriptHub or Wikipedia for syntax changes.

Sincerely, Coffee. 👋

Full Changelog: 2.1.1...2.5

2.1.1

03 Jan 15:14
Compare
Choose a tag to compare

skript-gson 2.1.0 🔰

Git

  • Hello everyone 👋

Hi there we have a couple of changes regarding the new json from the request, also changes in the Versioning Area and its automatic updates.

Thank you all for your attention.
Sincerely Coffee. 👋

FTW skript-gson

Full Changelog: 2.0.4...2.1.1

skript-gson 2.0.4 - Changed internal object mapping

02 Jan 15:12
Compare
Choose a tag to compare

skript-gson 2.0.4 🔰

Git

  • Hello everyone 👋

  • Changed internal object mapping for Items, now you are able to pull Item from mapped json as well.

command saveinv:
    trigger:
        set {inv} to json from player's inventory

command listinv:
    trigger:
        map {inv} to {_inv::*}
        loop (indices of {_inv::contents::*}):
            if {_inv::contents::%loop-value%::*} is set:
                set {_item} to {_inv::contents::%loop-value%::*}'s form parsed as skript-type
                give {_item} to "player's name" parsed as player

Another fix of mapping (formatting list to json)

on load:
    set {_k::basic::1} to 1
    set {_k::basic::2} to 2
    set {_k::basic2::*} to "test", "test2", 1, false, json from string "[1,2,false,{}]"
    set {_k::basic4::basic2::basic1::*} to "some data here, basically anything", new json from string "{}", new json from string "[]"

    send "&b%{_k::*}'s form%"

new

{"basic":["1","2"],"basic2":["test","test2","1",false,[1,2,false,{}]],"basic4":{"basic2":{"basic1":["some data here, basically anything",{},[]]}}}

old

{"basic":{"1":"1","2":"2"},"basic2":["test","test2","1",false,[1,2,false,{}]],"basic4":{}}

Thank you all for your attention.
Sincerely Coffee. 👋

FTW skript-gson

Full Changelog: 2.0.3...2.0.4

skript-gson 2.0.3 - Significantly changed adapters

23 Dec 11:16
Compare
Choose a tag to compare

skript-gson 2.0.3 🔰

Git

  • Hello everyone 👋

  • Significantly changed adapters

Thank you all for your attention.
Sincerely Coffee. 👋

FTW skript-gson

Full Changelog: 2.0.2...2.0.3

Small changes - skript-gson 2.0.2

18 Dec 02:25
Compare
Choose a tag to compare

skript-gson 2.0.2 🔰

Git

  • Hello everyone 👋

Addon

  • Added: ExprGetJsonElements.class
    -> Now you can get elements from JsonArray, JsonObject
set {_json} to new json from string "{'array': [1,2,false, true,0]}"
loop all json elements "array" from {_json}:
      send loop-value
  • ♾️ Fixed: ExprSkriptCollectionToJson.class

  • Now you can finally change/set/remove nested things from Skript Variable and than make a formatted json!

  • ♾️ Fixed: JsonElementType.class

  • Fixed nested things for adding/remove, removed the SimplyKey.class hence ~ now you can use normally "String", false (Boolean), 10 . - (Integer) and so on, but if you want to change or remove the nested key there is another procedure:

  • if you do not add anything to the nested object you can use the clasic Object (String, bool, etc...)
    if you want to insert into a nested object you have to write it in the string "obejct1:objectX:Key;Value"

  • Also you can mapped your own json

set {_json} to new json from string "{'A': {}, 'B': [], 'C': {'G': {}}}"
add false to {_json}                      # example 1
add "A:test;false" to {_json}          # example 2
add "C:G:test;A" to {_json}            # example 3
# Show case 1
{"A": {}, "B": [], "C": {"G": {}}, "3": false}
# Show case 2
{"A": {"test": false}, "B": [], "C": {"G": {}}}
# Show case 3
{"A": {}, "B": [], "C": {"G": {"test": "A"}}}
  • ♾️ Fixed: MapJson.class

  • Finally don't returning any nulls.

  • ♾️ Sanitized: All syntaxes..

Thank you all for your attention.
Sincerely Coffee. 👋

FTW skript-gson

Full Changelog: 2.0.0...2.0.2

2.0.0

13 Dec 23:25
Compare
Choose a tag to compare

Skript-Gson 2.0.0 🔰

Git

  • Hello everyone 👋

  • Fix the mapping issue, with NullPointer. also Fixed the Few things in the changing values.. also removed the options to change key. added full support for cached jsons. See more... in Full Change log.

Thank you all for your attention.
Sincerely Coffee. 👋

FTW skript-gson

Full Changelog: 1.4.0...2.0.0

skript-gson 1.4.0 (Loading file as given ID)

04 Dec 19:34
Compare
Choose a tag to compare

Skript-Gson 1.4.0 🔰

Git

  • Hello everyone 👋

  • demonstration of this version

on script load:
    load json file "gson/test.json" as "gson"
    set {-file} to "gson/test.json"

command saveloc [<string>]:
    trigger:
        append data (player's location) with key arg-1 to json file {-file}
        send "Location &8(&e%player's location%&e)&r saved in the json File."

command teleport:
    trigger:
        set {_} to element "test" from json (loaded json "gson")
        send "Teleporting player to Location &8'&etest&8'"
        teleport player to {_}

Json

{
  "test": { 
    "==": "org.bukkit.Location",
    "world": "world",
    "x": -229.0386861464188, 
    "y": 70.0,
    "z": 76.05075919038354,
    "pitch": 13.199765, 
    "yaw": 308.98376
  }
}

image
image

Addon

  • Added: CondJsonLoaded.class
"json %jsonelement% is loaded",
"json %jsonelement% is(n't| not) loaded"
  • Added: EffLoadJsonFile.class
"load json file %object% as %object%"
  • Added: ExprAllLoadedJsons.class
"(all|(:only) %-integer%) loaded json"
  • Added: ExprGetJsonElement.class
element %string% from [json] %jsonelement%
  • Added: ExprLoadedJson.class
loaded json [id] %object%
  • ♾️ Sanitized: All syntaxes..

Thank you all for your attention.
Sincerely Coffee. 👋

FTW skript-gson

Full Changelog: https://github.com/cooffeeRequired/skript-gson/compare/1.3.3..1.4.0

Fixed version - 1.3.3

30 Nov 19:44
Compare
Choose a tag to compare

Note

  • 1.3.3 - Small Fix ... (3-December-2022) - Fixed writing to file

Skript-Gson 1.3.3 🔰

Git

  • Hello everyone 👋

Addon

  • Change issues with skript-gson
  • Addon got Approved on skUnity.

Thank you all for your attention.
Sincerely Coffee. 👋

FTW Skript-Gson

Full Changelog: 1.3.0...1.3.3