Target :
- get data structure from JSON data
Format :
- String : 'string'
- Number : 'number'
- Boolean : 'boolean'
- Array : [...]
- Object : {...}
Example :
const jsonSchema = require('json-data-struct'); jsonSchema({ "stringType" : "this is string", "numberType" : 1, "booleanType" : true, "objectType" : { "child" : "content" } "arrayType" : ["hello"] });
Result :
{ stringType : 'string', numberType : 'number', booleanType : 'boolean', objectType : { child : 'string' }, arrayType : ['string'] }