RosettaCodeData/Task/JSON/Factor/json.factor

11 lines
241 B
Factor
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
USING: json.writer json.reader ;
SYMBOL: foo
! Load a JSON string into a data structure
"[[\"foo\",1],[\"bar\",[10,\"apples\"]]]" json> foo set
! Create a new data structure and serialize into JSON
{ { "blue" { "ocean" "water" } } >json