]> gitweb.factorcode.org Git - factor.git/blob - basis/json/writer/writer-docs.factor
factor: clean up whitespace in -docs files
[factor.git] / basis / json / writer / writer-docs.factor
1 ! Copyright (C) 2006 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: json help.markup help.syntax kernel ;
4 IN: json.writer
5
6 HELP: >json
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 } ;
10
11 HELP: json-print
12 { $values { "obj" object } }
13 { $description "Serializes the object into a JSON formatted string and outputs it to the standard output stream."
14 $nl
15 "Some options can control the formatting of the result:"
16 { $table
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" }
22 }
23 }
24 { $see-also >json } ;
25
26 { json-fp-special-error json-allow-fp-special? } related-words
27
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." } ;
30
31 ARTICLE: "json.writer" "JSON writer"
32 "The " { $vocab-link "json.writer" } " vocabulary defines words for converting objects to JSON format."
33 { $subsections
34     >json
35     json-print
36 } ;
37
38 ABOUT: "json.writer"