You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

json-schema-editor

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-schema-editor

React based editor for JSON Schemas

0.2.1
Source
npmnpm
Version published
Weekly downloads
4
-69.23%
Maintainers
1
Weekly downloads
 
Created
Source

JSON Schema Editor

Generates an HTML for creating and modifying json schemas. I created this because json-editor is not good at modifying schemas (using the meta schema)

Getting started

  • Make sure React is loaded on your page. If you're not using React yet you can use the following scripts to load it from a CDN.
<script src="https://fb.me/react-15.0.1.js"></script>
<script src="https://fb.me/react-dom-15.0.1.js"></script>
  • Include the JSON Schema Editor javascript file.
<script src="node_modules/dist/jsonschemaeditor.js"></script>
  • Add an element to your page to contain the editor.
<div id="container"></div>
  • Initialize the component
var element = document.getElementById('container');
var editor = new JSONSchemaEditor(element, {});
editor.setValue(product);

Example

Here is what the product schema example looks like rendered. JSON Schema Editor Example

Todo

  • Add support for the description field.
  • exclusiveMinimum and exclusiveMaximum, are these even necessary?
  • enums
  • refs
  • definitions
  • patternProperties
  • allOf, anyOf, oneOf

FAQs

Package last updated on 06 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.