JSON serialization - Factor Documentation (original) (raw)
The json vocabulary defines words for working with JSON (JavaScript Object Notation) formats.
Parsing strings in JSON format:
read-json ( -- object )
read-jsons ( -- objects )
path>json ( path -- json )
path>jsons ( path -- jsons )
Converting objects to JSON format:
Working with JSON null values:
if-json-null ( x if-null else -- )
when-json-null ( x if-null -- )
unless-json-null ( x else -- )
Working with JSON Lines format:
jsonlines> ( string -- objects )
read-jsonlines ( -- objects )
>jsonlines ( objects -- string )
write-jsonlines ( objects -- )
For more information, see https://en.wikipedia.org/wiki/JSON.