JSON: Difference between revisions

Content added Content deleted
No edit summary
Line 918: Line 918:
=={{header|Harbour}}==
=={{header|Harbour}}==
Parse JSON string into the ''arr'' variable:
Parse JSON string into the ''arr'' variable:
<lang harbour> Local arr
<lang visualfoxpro>LOCAL arr
hb_jsonDecode( '[101,[26,"Test1"],18,false]', @arr )</lang>
hb_jsonDecode( '[101,[26,"Test1"],18,false]', @arr )</lang>
Output the JSON representation of an array ''arr'':
Output the JSON representation of an array ''arr'':
<lang harbour> Local arr := { 101, { 18,"Test1"}, 18, .F. }
<lang visualfoxpro>LOCAL arr := { 101, { 18, "Test1" }, 18, .F. }
? hb_jsonEncode( arr )
? hb_jsonEncode( arr )
// The output is:
// The output is:
// [101,[26,"Test1"],18,false]</lang>
// [101,[26,"Test1"],18,false]</lang>


=={{header|Haskell}}==
=={{header|Haskell}}==