• 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 comminuty!

    Now, what are you waiting for? Join the community now!

SkJson 2.8.3

Doc's updated (SkUnity, SkriptHub)
Skript version:

  • 2.7.0 - Beta 1,
  • 2.7.0 - Beta 2,
  • 2.6.4
Changed
  1. small changes was also in the Execute web request


Code:
(execute|send|make) [new] (<.+>|%-string%) request to %string% [(:with headers) %-strings/json%] [and with (:body|:data) %-strings/json%][/B]
[B](execute|send|make) [new] (<.+>|%-string%) request to %string% [with (:body|:data) %-strings/json%] [and (:with headers) %-strings/json%]

Fixed

  1. size of %json% -> json size of %json%, cause old syntax has conflict with vanilla skript
  2. fixed block thread in the async method for sending request's and wriiting to file
Added
  1. Added convertation from .yml files to .json
Code:
set {_yaml json} to json from yaml file "..../test.yaml"[/B][/B]
[B][B]

  1. more properties of request's responses
Code:
[SkJson] [(:current|:previous)] request's (2:body|3:code|4:connection headers|[user] (5:headers)|6:url)[/B][/B]
[B][B][skJson] (2:body|3:code|4:connection headers|[user] (5:headers)|6:url) of [(:current|:previous)] request


234695158-7d0bab15-a395-423b-8814-bd902d81f722.png


234694940-f43c9192-a25f-40d3-a277-935ca3bf0edb.png


What's Changed

Full Changelog: https://github.com/SkJsonTeam/skJson/compare/2.8.2...2.8.3

Thank everyone for their support for ideas
Sincerely coffeeRequred.


SkJson - 2.8.2 Small Fixes

Updated examples,

Added examples for JsonChanger,
Also Using @NoDoc for Expression which are only auxiliary,
Also fixed bug which caused that longer strings were not saved to cached json..
Also modified debug system. https://github.com/cooffeeRequired/skJson/releases/tag/2.8.2
A lot of changes have been made, practically the whole addon is redesigned for performance reasons, some features are added but please read more on Github

upload_2023-3-26_11-4-43.png


Thanks CoffeeRequired!
skJson 2.7.0⚠️
Introduce


Hello everyone.

- Fix small bugs
- Fixed bundles
- Cleanup code
- fix Typos


[h3]Example[/h3]
Code:
{
  "items": [
      {"==":"org.bukkit.inventory.ItemStack","v":3218,"type":"APPLE","meta":{"==":"ItemMeta","meta-type":"UNSPECIFIC","display-name":"{\"extra\":[{\"bold\":false,\"italic\":false,\"underlined\":false,\"strikethrough\":false,\"obfuscated\":false,\"color\":\"white\",\"text\":\"Tomate\"}],\"text\":\"\"}","custom-model-data":1}},
      {"==":"org.bukkit.inventory.ItemStack","v":3218,"type":"APPLE","meta":{"==":"ItemMeta","meta-type":"UNSPECIFIC","display-name":"{\"extra\":[{\"bold\":false,\"italic\":false,\"underlined\":false,\"strikethrough\":false,\"obfuscated\":false,\"color\":\"white\",\"text\":\"Tomate2\"}],\"text\":\"\"}","custom-model-data":1}},
      {"==":"org.bukkit.inventory.ItemStack","v":3218,"type":"APPLE","meta":{"==":"ItemMeta","meta-type":"UNSPECIFIC","display-name":"{\"extra\":[{\"bold\":false,\"italic\":false,\"underlined\":false,\"strikethrough\":false,\"obfuscated\":false,\"color\":\"white\",\"text\":\"Tomate3\"}],\"text\":\"\"}","custom-model-data":1}}

  ],
  "nums": [
    1,
    2,
    3,
    0
  ]
}
Code:
command try:
    trigger:
        set {_} to json from file "items/test.json"
        send {_}
        remove json object player's tool from nested object "items" of {_}
        remove json index 1 from nested object "nums" of {_}
        send {_} with pretty print
````
* Fixed olders issue contains invalid mapping or invalid converting to the json.
* Also fixed issue what should remove the meta from the ItemStack, which should not be removed.
* Also fixed issue with CustomModelData contains id of model was lost from converting to json.
* Path-Hotlinking will not added because it's necessary use that hotlink instead link file instead.
* #13 null as new Data (Bug) was fully fixed -> Will apear error when you tried converting null json to the object.
* #15 fully supported new syntax for remove json from nested object.
* #18 - Item Conversion. When you put item to the Skript list and then you want retrieve it as json form, you got broken json from BukkitSerilization instead of our json normal representation
* #19 UTF-8 encoding error, Fixed
* #20 Item-Data encoding error, Fixed
* #24 Bundle(Custom model Data) lost, Fixed (Minecraft 1.19+)


[b]PLEASE READ THE NEW SYNTAXE'S! on the Skript hub[/b]



 Please check SkriptHub or Wikipedia for syntax changes.
## ❌  If you found any bugs, feel free to post it.

Sincerely, Coffee.

[b]Full Changelog[/b]: https://github.com/cooffeeRequired/skJson/compare/2.6.0...2.7.0
skJson pre-release 2.7.0⚠️
Introduce

> Hello everyone.

- Fix small bugs #22 #21 #20
- Fixed bundles
- Cleanup code
- fix Typos


[h3]Example[/h3]
Code:
{
  "items": [
      {"==":"org.bukkit.inventory.ItemStack","v":3218,"type":"APPLE","meta":{"==":"ItemMeta","meta-type":"UNSPECIFIC","display-name":"{\"extra\":[{\"bold\":false,\"italic\":false,\"underlined\":false,\"strikethrough\":false,\"obfuscated\":false,\"color\":\"white\",\"text\":\"Tomate\"}],\"text\":\"\"}","custom-model-data":1}},
      {"==":"org.bukkit.inventory.ItemStack","v":3218,"type":"APPLE","meta":{"==":"ItemMeta","meta-type":"UNSPECIFIC","display-name":"{\"extra\":[{\"bold\":false,\"italic\":false,\"underlined\":false,\"strikethrough\":false,\"obfuscated\":false,\"color\":\"white\",\"text\":\"Tomate2\"}],\"text\":\"\"}","custom-model-data":1}},
      {"==":"org.bukkit.inventory.ItemStack","v":3218,"type":"APPLE","meta":{"==":"ItemMeta","meta-type":"UNSPECIFIC","display-name":"{\"extra\":[{\"bold\":false,\"italic\":false,\"underlined\":false,\"strikethrough\":false,\"obfuscated\":false,\"color\":\"white\",\"text\":\"Tomate3\"}],\"text\":\"\"}","custom-model-data":1}}

  ],
  "nums": [
    1,
    2,
    3,
    0
  ]
}
```vb
command try:
trigger:
set {_} to json from file "items/test.json"
send {_}
remove json object player's tool from nested object "items" of {_}
remove json index 1 from nested object "nums" of {_}
send {_} with pretty print
````
Please check SkriptHub or Wikipedia for syntax changes.
❌ If you found any bugs, feel free to post it.

Sincerely, Coffee.

Full Changelog: https://github.com/cooffeeRequired/skJson/compare/2.6.21...pre-release-2.7.0
skJson 2.6.21⚠️
Introduce
Hello everyone.

New conventors for json.

  • Fix small bugs, #18
  • Cleanup code
  • fix Typos
Fixed.
Code:
command try:
   trigger:
       set {_test::*} to diamond sword named "&aA", apple, stone pickaxe
       broadcast {_test::*}'s form with pretty print

       set {_test::item1} to diamond sword named "&aA"
       set {_test::item2} to stone pickaxe
       set {_test::item3} to apple

       broadcast {_test::*}'s form with pretty print
on load:
   execute console command "try"
Please check SkriptHub or Wikipedia for syntax changes.

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

Full Changelog: 2.6.2...2.6.21
skJson 2.6.2⚠️
Introduce


Hello everyone.

- New conventors for json.
- Adding automatic parsing.
- Cleanup code
- fix Typos


From
Code:
command test:
    trigger:
        set {_loc-json} to json from player's location
        set {_loc} to {_loc-json} parsed as a location
        teleport player to {_loc}
To
Code:
command test:
    trigger:
        set {_loc-json} to json from player's location
        teleport player to {_loc-json}

Please check SkriptHub or Wikipedia for syntax changes.
❌ If you found any bugs, feel free to post it.


Sincerely, Coffee.

What's Changed
* New Conventors by @cooffeeRequired in https://github.com/cooffeeRequired/skJson/pull/14

Full Changelog https://github.com/cooffeeRequired/skJson/compare/2.6.1...2.6.2
skJson 2.6.1⚠️
Introduce

Hello everyone.
Hotfixed issue #11 , also the #13
Also was fixed all mapping / append / write issues.


Please check SkriptHub or Wikipedia for syntax changes.
## ❌ If you found any bugs, feel free to post it.

Sincerely, Coffee.

Full Changelog: https://github.com/cooffeeRequired/skJson/compare/2.5.9...2.6.1
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

Code:
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: https://github.com/cooffeeRequired/skJson/compare/2.5...2.5.9