Giter VIP home page Giter VIP logo

react-jsoneditor's Introduction

jsoneditor

A react based tool to view, edit,and format JSON

DEMO

http://jsoneditor.hotcn.top/

google translate

Npm Module

Install

  $ npm install react-jsoneditor

Example

  import JsonEdit from 'react-jsoneditor'

  function changeVal(val){
    console.log(val,"-----changeVal------")
  }

  const json = {
    "array1": ["aaaaaaaaaaaaaaaaa", 1, {a:1}],
    "array2": [],
    "boolean": true,
    "null1": null,
    "null2": "",
    "null3": 0,
    "number": 1234,
    "object1": {"a": "b", "c": "d"},
    "string1": "Hello World",
    "one": {
      "two": {
        "three":[{
          "array1":{
            "array2":{
              "array3":5555
            }
          }
        }]
      }
    }
  };

  render(
    <JsonEdit json={json} changeVal={changeVal} />,
    document.getElementById('root')
  )

react-jsoneditor's People

Contributors

yixianle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-jsoneditor's Issues

Error: You may need an appropriate loader to handle this file type

Hi, I received this error when I try to use your module, can you help me out and let me know what the reason for that is? Looks like webpack isn't recognizing this file type?

ERROR in ./~/react-jsoneditor/src/app.js
Module parse failed: /Users/app/node_modules/react-jsoneditor/src/app.js Unexpected token (25:11)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (25:11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.