19 lines
922 B
Plaintext
19 lines
922 B
Plaintext
! Copyright (C) 2006 Chris Double.
|
|
! See http://factorcode.org/license.txt for BSD license.
|
|
USING: help json ;
|
|
|
|
HELP: >json "( obj -- string )"
|
|
{ $values { "obj" "an object" } { "string" "the object converted to JSON format" } }
|
|
{ $description "Serializes the object into a JSON formatted string." }
|
|
{ $see-also json-print json> } ;
|
|
|
|
HELP: json-print "( obj -- )"
|
|
{ $values { "obj" "an object" } }
|
|
{ $description "Serializes the object into a JSON formatted string and outputs it to the standard output stream." }
|
|
{ $see-also >json json> } ;
|
|
|
|
HELP: json> "( string -- object )"
|
|
{ $values { "string" "a string in JSON format" } { "object" "yhe object deserialized from the JSON string" } }
|
|
{ $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." }
|
|
{ $see-also json-print >json } ;
|