Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

schema-based-json-editor

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schema-based-json-editor

[![Dependency Status](https://david-dm.org/plantain-00/schema-based-json-editor.svg)](https://david-dm.org/plantain-00/schema-based-json-editor) [![devDependency Status](https://david-dm.org/plantain-00/schema-based-json-editor/dev-status.svg)](https://da

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
64
increased by10.34%
Maintainers
1
Weekly downloads
 
Created
Source

Dependency Status devDependency Status Build Status npm version Downloads

schema-based-json-editor

install

npm i schema-based-json-editor

<link rel="stylesheet" href="node_modules/dragula/dist/dragula.min.css">
reactjs component demo
import { JSONEditor } from "schema-based-json-editor/dist/react/index";
<JSONEditor schema={schema}
    initialValue={initialValue}
    updateValue={value => this.value = value}
    theme="bootstrap3"
    icon="fontawesome4"
    locale="zh-cn" />

the online demo: https://plantain-00.github.io/schema-based-json-editor/demo/react/index.html

the source code of the demo: https://github.com/plantain-00/schema-based-json-editor/tree/master/demo/react

angular2 component demo
import { JSONEditorComponent, BooleanEditorComponent, ArrayEditorComponent, EditorComponent, NullEditorComponent, NumberEditorComponent, ObjectEditorComponent, StringEditorComponent, TitleEditorComponent, IconComponent } from "schema-based-json-editor/dist/angular/index";

@NgModule({
    imports: [BrowserModule, FormsModule],
    declarations: [MainComponent, JSONEditorComponent, BooleanEditorComponent, ArrayEditorComponent, EditorComponent, NullEditorComponent, NumberEditorComponent, ObjectEditorComponent, StringEditorComponent, TitleEditorComponent, IconComponent],
    bootstrap: [MainComponent],
})
class MainModule { }
<json-editor [schema]="schema"
    [initialValue]="value"
    (updateValue)="updateValue($event)"
    theme="bootstrap3"
    icon="fontawesome4"
    locale="zh-cn">
</json-editor>

the online demo: https://plantain-00.github.io/schema-based-json-editor/demo/angular/index.html

the source code of the demo: https://github.com/plantain-00/schema-based-json-editor/tree/master/demo/angular

properties of the component
  • schema: the json schema object
  • initialValue: the initial json
  • updateValue: the function that is invoked when the json is edited in the editor
  • theme: optional, support "bootstrap3" for now
  • icon: optional, support "bootstrap3" and "fontawesome4" for now
  • locale: optional, support "zh-cn" for now
  • readonly: optional, a boolean value
features
  • reactjs component
  • angular2 component
  • vuejs component
  • common schema fields: title, description, default, readonly
  • object schema fields: properties, required
  • array schema fields: items, minItems, uniqueItems
  • number and integer shema fields: minimum, exclusiveMinimum, maximum, exclusiveMaximum, enum
  • string schema fields: format, enum, minLength, maxLength, pattern
todo list
  • vuejs component

FAQs

Package last updated on 03 Nov 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc