Releases: cooffeeRequired/skJson
4.0.1-HOT-PATCHED
New Features #1
Important
NEW FEATURES
All keys from json object by given path
on script load:
set {_j} to json from "{data: {A: 'B', C: 'C', 'G': G}}"
send {_j}
set {_keys::*} to all keys of "data" of {_j}
send "&aKeys: %{_keys::*}%"
Get filename from loopped file
on script load:
loop all json files in dir ".\plugins\SkriptHubDocsTool\documentation" as files:
send "File: &a%loop-file%"
send "File name: &c%loop-file's name%"
send "File name: &c%loop-file's name without file type%"
send "File size: &e%loop-file's size%"
send "File path: &b%loop-file's path%"
send "File content: &2%value "metadata" of loop-file's content%"
What's Changed
- Dev/fix api by @cooffeeRequired in #102
- new features #1 by @cooffeeRequired in #103
Full Changelog: 4.0...4.0.1
Fix handling cache, and adding nesting element while array doesn't exist
Note
Huge thanks to the guys who continue to diligently report bugs and test limits to the world of json - SkJson
👏 @ExCorde
📢Big Shout Out to Them!
What's Changed
- Update 4.0 by @cooffeeRequired in #98
Full Changelog: 3.0.91...4.0
Fix Reques HTTP sync handling, 1.20.6 Cache saving issue resolved.
Fix nbt issues, add ~ as path identifier
Full Changelog: 3.0.6...3.0.7
Important
BugFixes
1. Bug regarding bad parsing of nbt 🚩#90
command /addtrade:
permission: OP
trigger:
set {_jt} to json from file "plugins/SkJson/test.json" # this is my json file
set {_slot0} to full nbt compound of slot 0 of player
set {_slot1} to full nbt compound of slot 1 of player
set {_slot2} to full nbt compound of slot 2 of player
set {_n} to 0
send {_jt} with pretty print to console
write {_jt} to json file "plugins/SkJson/trader.json"
loop values "trade::%{_n}%" of {_jt}:
send json-key to console
set value of json object "trade::0::%{_n}%::0::nbt" in {_jt} to {_slot0}
set value of json object "trade::0::%{_n}%::1::nbt" in {_jt} to {_slot1}
set value of json object "trade::0::%{_n}%::2::nbt" in {_jt} to {_slot2}
write {_jt} to json file "plugins/SkJson/trader.json"
At this point the nbt are converted successfully to the Object
"nbt": {
"..": "com.shanebeestudios.skbee.api.nbt.NBTContainer",
"nbt": "{Count:1b,id:\"minecraft:stone\",tag:{CustomModelData:222,Damage:222,Enchantments:[{id:\"aqua_affinity\",lvl:1},{id:\"binding_curse\",lvl:1},{id:\"vanishing_curse\",lvl:1}],RepairCost:2222,Tags:[\"Test\",\" test2\",\" test\"],display:{Lore:['[{\"text\":\"asdasdasdasd\",\"italic\":false}]'],Name:'[{\"text\":\"asdasdasd\",\"italic\":false}]'}}}"
}
2. Bug regarding to wrong parsed http headers 🚩
Sometime could happen the Content-Type headers was broken, missing space or basically sending body to the GET request
That is already fixed, all headers could be used no matter what.
3. Bug regarding to response types (JsonArray or Plain/Text) 🚩
The response of type JsonArray or Plain/Text was ignored, that's already fixed and sanitized!
Note
Add
~
as path identifier of plugins/Skript/scripts
Example
on load:
set {_file} to json from file "~/test.json"
new json file "~/raw.json"
send {_file}
So the file will be created in the plugins/Skript/scripts
Note
Huge thanks to the guys who continue to diligently report bugs and test limits to the world of json - SkJson
👏 @Pex666
👏 @kubaczak
👏 @boxic
👏 @kitoxis
👏 @DRAGNIL68
📢Big Shout Out to Them!
3.0.6
Full Changelog: 3.0.5...3.0.6
Important
Fix reading json arrays from web requests.
3.0.5
Full Changelog: 3.0.4...3.0.5
Important
Fix permission escalation for skjson command, now you need to have permission node skjson.use
or op
Fix editing files, request on authorized website, fix patch request
Full Changelog: 3.0.3...3.0.4
Important
BugFixes
1. Bug regarding on editing files. with effect edit
command changefile:
trigger:
edit value "type" of json file "plugins/Skript/scripts/test.json" to "DIAMOND"
Before
changefile
[08:28:42 INFO]: [SkJson] WARN Cannot create a file plugins/Skript/scripts/test.json cause the file already exists.
2. Bug regarding on sending web request on authorized apis (google, icloud, crypto stuff, and more)
Fix Some small issues and typos
What's Changed
- Switch from json serializaton to custom adapters by @SkJsonTeam in #85
- Switch from json serializaton to custom adapters by @cooffeeRequired in #89
Full Changelog: 3.0.1...3.0.3
Important
BugFixes
1. Bug regarding bad encoding of ASCII characters 🚩#88
local function ASCIISymbolsFix2_26_24():
set {_json} to json from file "./plugins/Scripts/test.json"
send json from "»»»" to console
send {_json} with pretty print to console
At this point the json file returned "B»B»B»"
for some it was ~A"~A"~A"
This is already fixed.
2. Bug regarding to completed resource handling for requests 🚩discord
local function requestSyncFix2_26_24() :: object:
set {_request} to prepare new GET request on "https://raw.githubusercontent.com/SkJsonTeam/skJson/main/skjson.json"
set {_request}'s request content to @{"A": true}
set {_request}'s headers to @{"Content-Type": "application/json+vhd"}
sync send prepared {_request}
if response status of {_request} is "OK":
return response content of {_request}
Fixed for now, working with web request is always meh, but if you really need to use synchronous request you can now use [:sync] (send|execute) [prepared] %request%
3. Bug regarding to wrong parsing for value of %json%
🚩#86
Now fully fixed
4. Bug regarding to FileWriting 🚩#84
Writing and formatting was handled by one method, which was not properly checked now fixed
Note
Huge thanks to the guys who continue to diligently report bugs and test limits to the world of json - SkJson
👏 @envizar
👏 @kubaczak
👏 @ExCorde
👏 @ImNotStable
👏 @Pumkinhead
👏 @MinecraftNight4
📢Big Shout Out to Them!
3.0.2-IO
Fix broken save json %string%
For example, the operations for linking a file were error, fix (save json "..."), that will handle in the newest
Skript version as World. (changed to save cached json %string%
Fix cache - cache will be keep until reload/restart your server
Full Changelog: 3.0.1...3.0.2-IO