@crft/jsonizer

JSON Schema all the Objects! It works in the browser and Node.

Usage no npm install needed!

<script type="module">
  import crftJsonizer from 'https://cdn.skypack.dev/@crft/jsonizer';
</script>

README

@crft/jsonizer

JSON Schema all the Objects! It works in the browser and Node.

Usage

Install:

yarn add @crft/jsonizer

then call it like:

import { schemaGenerator } from '@crft/jsonizer';

const result = schemaGenerator({
  bacon: true
});

the result will look like:

{
  type: 'object',
  required: [],
  properties: {
    bacon: {
      title: 'Bacon',
      type: 'boolean',
      examples: [true]
    }
  }
}