RosettaCodeData/Task/JSON/Factor/json.factor

11 lines
241 B
Factor

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