20 lines
352 B
Plaintext
20 lines
352 B
Plaintext
a,b:=Import.lib("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();
|