Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/JSON/Pike/json.pike
Normal file
13
Task/JSON/Pike/json.pike
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
int main() {
|
||||
// Decoding
|
||||
string json = "{\"cake\":[\"desu\",1,2.3],\"foo\":1}";
|
||||
write("%O\n", Standards.JSON.decode(json));
|
||||
|
||||
// Encoding
|
||||
mapping m = ([
|
||||
"foo": ({ 1, 2, 3 }),
|
||||
"bar": "hello"
|
||||
]);
|
||||
|
||||
write("%s\n", Standards.JSON.encode(m));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue