module json
json encoding and decoding module
Quote:
1
2var encoding = require('encoding');
var json = encoding.json;
or
1var json = require('json');
static function
encode
Encode variables in json format
1static String json.encode(Value data);
Call parameters:
- data: Value, the variable to encode
Return results:
- String, returns the encoded string
decode
Decode a string into a variable in json mode
1static Value json.decode(String data);
Call parameters:
- data: String, the string to be decoded
Return results:
- Value, returns the decoded variable