-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Note
-
Most Skript users are well aware that, by default, Skript only allows player data to be stored using variables (e.g., {money.%player's uuid%}). These variables are saved in a .csv table, which can become extremely cluttered and difficult to manage. SkJson is an add-on for Skript that provides comprehensive file management capabilities. It enhances Skript by enabling the storage and processing of player and server data using JSON files.
-
SkJson
is a tool developed forSkriptLang
, which extends the above mentioned > SkriptLang by the possibility of processing.json|.jsonc
file, it allows to > serialize/deserialize various objects that are freely available in MC, it is also > possible to read and write files or to link files to the so-calledcache
. -
As for the mentioned
Cache
, it serves as a place in ram memory from where writing > and reading different files is extremely fast, and allows easy manipulation of files > directly in the code. -
Skjson
also supports working withWebRequests
and hence you can send web > requests of typePOST, GET, PUT, PATCH, HEAD, MOCK, DELETE
directly from the > Script and process the response directly.
{
"players": {
"933334f8-a330-4551-81dd-aafb677a8186": {
"name": "ExCorde",
"money": 500.0,
"group": "admin"
}
}
}
{
"object": {},
"array": [],
"string": "Hello world!",
"integer": 1,
"float": 1.1,
"boolean": true,
"null": null
}
- As for the
.jsonc
format, it is similar, but it can also contain comments - ❗❗
JSONC
is not yet available, but is planned forSkJson 4.6
{
// this serves as a sample JSONC
"object": {}, // this is an object
"array": [], // this is an array
"string": "Hello world!",
"integer": 1,
"float": 1.1,
"boolean": true,
"null": null
}
Important
-
create new json
- here we will > show how to easily createjson
wishes in the > mentioned scriptlang -
work with json
- here we > show how to work withjson
, change, delete, add -
working with files
- here > we show how to work with files. -
working with requests
- > here we show how to work with requests -
working with cache
- here > we show how to work with cache and how to link it to > files.
...