{"id":48250,"library":"json-editor","title":"JSON Editor","description":"JSON Editor is a JavaScript library that generates HTML forms from JSON Schema (versions 3 and 4). Version 0.7.28 is the latest stable release as of this writing, but the project appears to be in maintenance mode with no recent updates. It supports multiple CSS frameworks (Bootstrap, Foundation, jQueryUI) and template engines (Mustache, Underscore, Handlebars, etc.). Unlike newer alternatives like react-jsonschema-form, JSON Editor is dependency-free and works with vanilla JS, making it suitable for legacy projects or where a lightweight, framework-agnostic solution is needed.","status":"maintenance","version":"0.7.28","language":"javascript","source_language":"en","source_url":"https://github.com/jdorn/json-editor","tags":["javascript","json","schema","jsonschema","editor"],"install":[{"cmd":"npm install json-editor","lang":"bash","label":"npm"},{"cmd":"yarn add json-editor","lang":"bash","label":"yarn"},{"cmd":"pnpm add json-editor","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Module is CommonJS-only; the default export is the constructor.","wrong":"const JSONEditor = require('json-editor')","symbol":"JSONEditor","correct":"import JSONEditor from 'json-editor'"},{"note":"Must be instantiated with 'new'.","wrong":"var editor = JSONEditor.create(element, options);","symbol":"JSONEditor (as class)","correct":"var editor = new JSONEditor(element, options);"},{"note":"Options are nested under 'defaults'.","wrong":"JSONEditor.options.theme = 'bootstrap3';","symbol":"Defaults","correct":"JSONEditor.defaults.options.theme = 'bootstrap3';"}],"quickstart":{"code":"import JSONEditor from 'json-editor';\n\nconst schema = {\n  type: 'object',\n  properties: {\n    name: { type: 'string', title: 'Name' },\n    age: { type: 'integer', title: 'Age', minimum: 0 }\n  }\n};\n\nconst start = { name: 'John', age: 30 };\n\nconst element = document.getElementById('editor_holder');\nconst editor = new JSONEditor(element, {\n  schema: schema,\n  startval: start,\n  theme: 'bootstrap3',\n  iconlib: 'fontawesome4',\n  ajax: false,\n  disable_edit_json: true\n});\n\n// Get value when needed\nconst value = editor.getValue();\nconsole.log(value);\n\n// Also available: editor.on('change', () => { /* handle changes */ });","lang":"javascript","description":"Creates a JSON Schema-driven form with basic fields, retrieves the current value, and sets up change listener."},"warnings":[{"fix":"Set 'keep_oneof_values: false' to remove unselected options from the output, or check for hidden fields manually.","message":"The 'getValue()' method may not include fields that are conditionally hidden via 'if/then/else' or 'oneOf'.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Manually deduplicate values after retrieving from editor.","message":"When using 'type: array' with 'enum' values, the editor may not handle duplicates correctly.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use 'no_additional_properties: true' to disable editing JSON and properties.","message":"The 'disable_edit_json' and 'disable_properties' options are deprecated in favor of 'no_additional_properties'.","severity":"deprecated","affected_versions":">=0.7.0"},{"fix":"Include '<script src=\"mustache.js\"></script>' before loading JSON Editor.","message":"Template engines are not bundled; you must include e.g. Mustache yourself for them to work.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Switch to 'bootstrap3' or another supported theme.","message":"Theme 'bootstrap2' was removed in a later version; use 'bootstrap3' or 'foundation5' instead.","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"To fully disable reordering, also set 'disable_array_reorder: true' and ensure drag-and-drop is disabled (no built-in option).","message":"When using 'disable_array_reorder: true', the 'move up' and 'move down' buttons are hidden but the array can still be reordered via drag-and-drop if enabled.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Set 'options.collapsed: true' on the schema to default collapsed.","message":"The 'disable_collapse' option is deprecated; use 'collapsed' property on object/array schemas instead.","severity":"deprecated","affected_versions":">=0.7.0"}],"env_vars":null,"search_vec":"'0.7.28':21 '3':17 '4':19 'agnost':90 'altern':61 'appear':34 'bootstrap':49 'css':47 'depend':71 'dependency-fre':70 'editor':2,4,68,98 'engin':54 'etc':58 'form':12,66 'foundat':50 'framework':48,89 'framework-agnost':88 'free':72 'generat':10 'handlebar':57 'html':11 'javascript':7,94 'jqueryui':51 'js':77 'json':1,3,14,67,95 'jsonschema':65,97 'latest':24 'legaci':82 'librari':8 'lightweight':87 'like':62 'mainten':38 'make':78 'mode':39 'multipl':46 'mustach':55 'need':93 'newer':60 'project':33,83 'react':64 'react-jsonschema-form':63 'recent':42 'releas':26 'schema':15,96 'solut':91 'stabl':25 'suitabl':80 'support':45 'templat':53 'underscor':56 'unlik':59 'updat':43 'vanilla':76 'version':16,20 'work':74 'write':30","created_at":"2026-06-07T16:55:39.801775+00:00","updated_at":"2026-06-07T16:55:39.801775+00:00","problems":[{"fix":"Use `import JSONEditor from 'json-editor'` or `const JSONEditor = require('json-editor').default` if using TypeScript with esModuleInterop.","cause":"Using CommonJS require in an ESM project or missing the default import correctly.","error":"TypeError: JSONEditor is not a constructor"},{"fix":"Include a compatible template engine script before json-editor, or set `template: 'default'` to use the built-in simple template.","cause":"A template engine is required but not included.","error":"Uncaught ReferenceError: Mustache is not defined"},{"fix":"Use `editor.getValue()` after instantiating with `new JSONEditor(element, options)`.","cause":"Calling getValue() on an element instead of the editor instance.","error":"Uncaught TypeError: (intermediate value).getValue is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/jdorn/json-editor#readme","github":"https://github.com/jdorn/json-editor","docs":null,"changelog":null,"pypi":null,"npm":"json-editor","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}