JSON: Difference between revisions

Content added Content deleted
(→‎{{header|Bracmat}}: Added mention of new UFP object for floating point operations in Bracmat)
(→‎Insitux: inclusion)
Line 2,180: Line 2,180:
'{"age":5,"name":"pojo"}'
'{"age":5,"name":"pojo"}'
</pre>
</pre>

=={{Header|Insitux}}==

<syntaxhighlight lang="insitux">
(var object {:a 1 :b "Hello, world!" [1 2 3] :c}
serialised (to-json object)
deserialised (from-json serialised))

(print "Object: " object)
(print "Serialised: " serialised)
(str "Deserialised: " deserialised)
</syntaxhighlight>

{{out}}

<pre>
Object: {:a 1, :b "Hello, world!", [1 2 3] :c}
Serialised: {":a":1,":b":"Hello, world!","[1 2 3]":":c"}
Deserialised: {":a" 1, ":b" "Hello, world!", "[1 2 3]" ":c"}
</pre>

Observe that JSON is incapable of lossless serialisation and deserialisation of Insitux data structures, with the recommended approach rather being [https://www.rosettacode.org/wiki/Object_serialization#Insitux <code>str</code> and <code>safe-eval</code>].


=={{header|J}}==
=={{header|J}}==