2.6.2Functions

JSONdecode

Decode an item stored in JSON format.

JSONdecode( source )
source A string or a stream from which to read the JSON data.
Returna string containing the JSON string, if stream is nil
Raise
JSONError if the input data cannot be parsed.
IoError in case of error on the source stream.

JSONencode

Encode an item in JSON format.

JSONencode( item, [stream],[pretty],[readable] )
item the item to be encoded in JSON format.
stream A stream on which to send the encoded result.
pretty Add spacing around separators and puntaction.
readable Put each item in lists on a separate line.
Returna string containing the JSON string, if stream is nil
Raise
JSONError if the passed item cannot be turned into a JSON representation.
IoError in case of error on target stream.
Made with http://www.falconpl.org