JSON: Difference between revisions

361 bytes added ,  10 years ago
(→‎{{header|Julia}}: add example)
Line 915:
[age:1, name:[given:Pebbles, family:Flintstone], relationships:[mother:people[1], father:people[0]]]
[age:1, name:[given:Bam-Bam, family:Rubble], relationships:[mother:people[3], father:people[2]]]</pre>
 
=={{header|Harbour}}==
Parse JSON string into the ''arr'' variable:
<lang harbour> Local arr
hb_jsonDecode( '[101,[26,"Test1"],18,false]', @arr )</lang>
Output the JSON representation of an array ''arr'':
<lang harbour> Local arr := { 101, { 18,"Test1"}, 18, .F. }
? hb_jsonEncode( arr )
// The output is:
// [101,[26,"Test1"],18,false]</lang>
 
=={{header|Haskell}}==
Anonymous user