(index ("json-write" 0) ("json-read" 679))
(def (sig (procedure "(json-write OBJECT [PORT])" (id json-write))) (p "Writes the Scheme data object " (tt "OBJECT") " in JSON format to " (tt "PORT") " which defaults to the value of " (tt "(current-output-port)") ". Scheme data is mapped to JSON format in the following way:") (table "\t" (tr (th (@ (align "left")) " Scheme") (th (@ (align "left")) "JSON")) "\n\t" (tr (td "Hash-table") (td "Structure")) "\n\t" (tr (td "Vector") (td "Structure (assuming vector consists of " (tt "(SYMBOL . DATA)") " pairs")) "\n\t" (tr (td "List") (td "Array")) "\n\t" (tr (td "Number") (td "Number")) "\n\t" (tr (td "Void") (td "Null")) "\n\t" (tr (td "String or symbol") (td "String"))))
(def (sig (procedure "(json-read [PORT])" (id json-read))) (p "Reads data in JSON format from " (tt "PORT") " which defaults to the value of " (tt "(current-input-port)") ".") (p "Note that json-read does not produce alists, as the result are vectors and not lists, and keys are strings and not symbols."))
