1 ! Copyright (C) 2006 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: json help.markup help.syntax kernel ;
7 { $values { "obj" object } { "string" "the object converted to JSON format" } }
8 { $description "Serializes the object into a JSON formatted string." }
9 { $see-also json-print } ;
12 { $values { "obj" object } }
13 { $description "Serializes the object into a JSON formatted string and outputs it to the standard output stream."
15 "Some options can control the formatting of the result:"
17 { { $link json-allow-fp-special? } "Allow special floating-points: NaN, Infinity, -Infinity" }
18 { { $link json-friendly-keys? } "Convert - to _ in tuple slots and hashtable keys" }
19 { { $link json-coerce-keys? } "Coerce hashtable keys into strings" }
20 { { $link json-escape-slashes? } "Escape forward slashes inside strings" }
21 { { $link json-escape-unicode? } "Escape unicode values inside strings" }
26 { json-fp-special-error json-allow-fp-special? } related-words
28 HELP: json-fp-special-error
29 { $error-description "Thrown by " { $link "json.writer" } " when attempting to serialize -1/0. or +1/0. or NaN when " { $link json-allow-fp-special? } " is not enabled." } ;
31 ARTICLE: "json.writer" "JSON writer"
32 "The " { $vocab-link "json.writer" } " vocabulary defines words for converting objects to JSON format."