Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,15 +0,0 @@
|
|||
:- %say
|
||||
|= [^ [in=@tas ~] ~]
|
||||
:- %noun
|
||||
=+ obj=(need (poja in)) :: try parse to json
|
||||
=+ typ=$:(name=@tas age=@ud) :: datastructure
|
||||
=+ spec=(ot name/so age/ni ~):jo :: parsing spec
|
||||
?. ?=([%o *] obj) :: isnt an object?
|
||||
~
|
||||
=+ ^= o
|
||||
%. %. (spec obj) :: parse with spec
|
||||
need :: panic if failed
|
||||
,typ :: cast to type
|
||||
=. age.o +(age.o) :: increment its age...
|
||||
%: crip %: pojo :: pretty-print result
|
||||
(jobe [%name s/name.o] [%age n/(crip <age.o>)] ~) :: convert back to json
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
(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