dynamic-json
Serialize and deserialize dynamic json data.
Installation
$ npm install dynamic-json
test
$ sudo npm install -g mocha && npm test
API
serialize
var dynamic = ;var serialize = dynamicserialize;var result = ;
deserialize
var deserialize = dynamicdeserialize;var dynamicJson = ;
params
dynamicJson
:
the dynamic json data you want to serialize.
standard
:
every json response to every key in dynamicJson
.
result
:
the serialize result.
Example
var dynamic = ;var serialize = dynamicserialize;var deserialize = dynamicdeserialize;var dynamicJson = '1': '2': '3': 'hello world' ;var standard = 'person': '1': 'node' '2': 'you' '3': 'I' 'date': '1': 'yesterday' '2': 'today' 'action': '1': 'write' '2': 'think' '3': 'say' ;;//{person: 'node', date: 'today', action: 'say', value: 'hello world'}//{'1': {'2': {'3': 'hello world'}}}
TODO
...