Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -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

View file

@ -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)