Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
8
Task/JSON/Icon/json-1.icon
Normal file
8
Task/JSON/Icon/json-1.icon
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import json # Get the JSON package
|
||||
link ximage # Used to display internal structures
|
||||
|
||||
procedure main(A)
|
||||
write(ximage(j := jtou(A[1]))) # JSON -> Unicon datatype
|
||||
write(s := utoj(j)) # Unicon datatype -> JSON...
|
||||
write(ximage(jtou(s))) # ...and back again as as check
|
||||
end
|
||||
7
Task/JSON/Icon/json-2.icon
Normal file
7
Task/JSON/Icon/json-2.icon
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue