1 ! Copyright (C) 2006 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax ;
7 { $values { "string" "a string in JSON format" } { "object" "a deserialized object" } }
8 { $description "Deserializes the JSON formatted string into a Factor object. JSON objects are converted to Factor hashtables. All other JSON objects convert to their obvious Factor equivalents." } ;
11 { $values { "objects" { $sequence "deserialized objects" } } }
12 { $description "Reads JSON formatted strings into a vector of Factor object until the end of the stream is reached. JSON objects are converted to Factor hashtables. All other JSON objects convert to their obvious Factor equivalents." } ;
16 { "path" "a pathname string" }
17 { "json" "a JSON object" }
19 { $description "Reads a file into a single JSON object. Throws an error if the file contains more than one json." } ;
20 { path>json path>jsons } related-words
24 { "path" "a pathname string" }
25 { "jsons" { $sequence "JSON objects" } }
27 { $description "Reads a file into a sequence of JSON objects and returns them all." } ;
29 ARTICLE: "json.reader" "JSON reader"
30 "The " { $vocab-link "json.reader" } " vocabulary defines a word for parsing strings in JSON format."
31 "For more information, see " { $url "https://en.wikipedia.org/wiki/JSON" } "."
32 { $subsections json> read-json path>json path>jsons } ;