json-data-schema

1.0.2 • Public • Published

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'] }

Readme

Keywords

Package Sidebar

Install

npm i json-data-schema

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

2.85 kB

Total Files

3

Last publish

Collaborators

  • thangphung