September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
19
Task/JSON/Zkl/json-1.zkl
Normal file
19
Task/JSON/Zkl/json-1.zkl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
a,b:=Import("zklYAJL");
|
||||
var [const] YAJL=a, toJSON=b;
|
||||
src:=
|
||||
#<<<
|
||||
0'|{
|
||||
"pi": 3.14,
|
||||
"large number": 123456789123456791,
|
||||
"an array": [
|
||||
-1,
|
||||
true,
|
||||
false,
|
||||
null,
|
||||
"foo"
|
||||
]
|
||||
}|;
|
||||
#<<<
|
||||
obj:=YAJL().write(src).close();
|
||||
// or obj:=src.pump(YAJL()).close(); // for example, from file or socket
|
||||
obj.println();
|
||||
2
Task/JSON/Zkl/json-2.zkl
Normal file
2
Task/JSON/Zkl/json-2.zkl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
// using above code plus:
|
||||
toJSON(obj).println();
|
||||
Loading…
Add table
Add a link
Reference in a new issue