RosettaCodeData/Task/JSON/Factor/json.factor

11 lines
241 B
Factor
Raw Permalink Normal View History

2013-04-10 21:29:02 -07: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