mirror of
https://github.com/aNNiMON/Own-Programming-Language-Tutorial.git
synced 2024-09-20 08:44:20 +03:00
17 lines
269 B
Plaintext
17 lines
269 B
Plaintext
|
use "json"
|
||
|
|
||
|
data = {
|
||
|
"name": "Json Example",
|
||
|
"version": 1,
|
||
|
"arrayData": [
|
||
|
1, 2, 3, 4
|
||
|
],
|
||
|
"objectData": {
|
||
|
"key": "value",
|
||
|
10: "1000"
|
||
|
}
|
||
|
}
|
||
|
println "Json encode"
|
||
|
println "Minified: " + jsonencode(data)
|
||
|
println "Pretty-print: " + jsonencode(data, 2)
|