Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
14
Task/JSON/Rebol/json-1.rebol
Normal file
14
Task/JSON/Rebol/json-1.rebol
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
json-str: {{"menu": {
|
||||
"id": "file",
|
||||
"string": "File:",
|
||||
"number": -3,
|
||||
"boolean": true,
|
||||
"boolean2": false,
|
||||
"null": null,
|
||||
"array": [1, 0.13, null, true, false, "\t\r\n"],
|
||||
"empty-string": ""
|
||||
}
|
||||
}}
|
||||
|
||||
reb: json-to-rebol json-str
|
||||
str: rebol-to-json reb
|
||||
16
Task/JSON/Rebol/json-2.rebol
Normal file
16
Task/JSON/Rebol/json-2.rebol
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
json-str: {{"menu": {
|
||||
"id": "file",
|
||||
"string": "File:",
|
||||
"number": -3,
|
||||
"boolean": true,
|
||||
"boolean2": false,
|
||||
"null": null,
|
||||
"array": [1, 0.13, null, true, false, "\t\r\n"],
|
||||
"empty-string": ""
|
||||
}
|
||||
}}
|
||||
import json ;; just in case it's not yet imported
|
||||
probe reb: decode 'json json-str
|
||||
probe str: encode 'json reb ;; outputs without any indentation
|
||||
;; Validate that re-encoded JSON is same
|
||||
probe equal? reb decode 'json str
|
||||
Loading…
Add table
Add a link
Reference in a new issue