lb.base.json

JSON (JavaScript Object Notation) Adapter Module for Base Library

Authors

Copyright

Eric Bréchemier © 2011, Some Rights Reserved Legal-Box SAS © 2010-2011, All Rights Reserved

License

BSD License http://creativecommons.org/licenses/BSD/

Version

2011-08-14

Summary
lb.base.jsonJSON (JavaScript Object Notation) Adapter Module for Base Library
Functions
parse(string): object|arrayParse a JSON string into corresponding object or array.
serialize(object): stringSerialize a JSON object or array into a JSON string.

Functions

parse(string): object|array

Parse a JSON string into corresponding object or array.

Parameter

stringstring, a JSON string

Returns

object|array, the object or array resulting from parsing

serialize(object): string

Serialize a JSON object or array into a JSON string.

Parameter

objectobject|array, a JavaScript object or array.  No function should be present in properties of a provided object or any object within.

Returns

string, a string resulting from serialization of given object or array (end)

Close