11074.zip
大小:1.72MB
价格:20积分
下载量:0
评分:
5.0
上传者:qq_21171735
更新日期:2024-10-16

一款网页版JSON编辑器源码

资源文件列表(大概)

文件名
大小
一款网页版JSON编辑器源码/
-
一款网页版JSON编辑器源码/jsoneditor-develop/
-
一款网页版JSON编辑器源码/jsoneditor-develop/.babelrc
48B
一款网页版JSON编辑器源码/jsoneditor-develop/.github/
-
一款网页版JSON编辑器源码/jsoneditor-develop/.github/FUNDING.yml
18B
一款网页版JSON编辑器源码/jsoneditor-develop/.github/workflows/
-
一款网页版JSON编辑器源码/jsoneditor-develop/.github/workflows/build.yaml
673B
一款网页版JSON编辑器源码/jsoneditor-develop/.gitignore
79B
一款网页版JSON编辑器源码/jsoneditor-develop/.npmignore
129B
一款网页版JSON编辑器源码/jsoneditor-develop/CONTRIBUTING.md
671B
一款网页版JSON编辑器源码/jsoneditor-develop/docs/
-
一款网页版JSON编辑器源码/jsoneditor-develop/docs/api.md
33.36KB
一款网页版JSON编辑器源码/jsoneditor-develop/docs/shortcut_keys.md
1.49KB
一款网页版JSON编辑器源码/jsoneditor-develop/docs/styling.md
1.14KB
一款网页版JSON编辑器源码/jsoneditor-develop/docs/usage.md
2.52KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/
-
一款网页版JSON编辑器源码/jsoneditor-develop/examples/01_basic_usage.html
1.17KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/02_viewer.html
807B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/03_switch_mode.html
1.35KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/04_load_and_save.html
1.99KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/05_custom_fields_editable.html
1.33KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/06_custom_styling.html
1.22KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/07_json_schema_validation.html
3.02KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/08_custom_ace.html
1.71KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/09_readonly_text_mode.html
1.52KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/10_templates.html
1.49KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/11_autocomplete_basic.html
1.16KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/12_autocomplete_dynamic.html
1.76KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/13_autocomplete_advanced.html
3.18KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/14_translate.html
1.16KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/15_selection_api.html
3.04KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/16_synchronize_editors.html
1.45KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/17_on_event_api.html
1.77KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/18_custom_validation.html
2.93KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/19_custom_validation_async.html
2.48KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/20_custom_css_style_for_nodes.html
3.54KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/21_customize_context_menu.html
4.95KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/22_on_validation_event.html
3.38KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/23_custom_query_language.html
3.65KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/24_new_window.html
2.33KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/25_sync_node_expand.html
1.71KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/26_autocomplete_by_schema.html
5KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/27_autocomplete_by_schema_recursive_refs.html
5.86KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/css/
-
一款网页版JSON编辑器源码/jsoneditor-develop/examples/css/darktheme.css
1.71KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/
-
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/.env
26B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/.gitignore
285B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/package-lock.json
1.09MB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/package.json
636B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/public/
-
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/public/index.html
1.25KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/README.md
312B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/src/
-
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/src/App.css
163B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/src/App.js
1.86KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/src/App.test.js
248B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/src/index.css
36B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/src/index.js
225B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/src/JSONEditorReact.css
63B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_advanced_demo/src/JSONEditorReact.js
1.89KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/
-
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/.env
26B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/.gitignore
285B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/package-lock.json
1.09MB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/package.json
602B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/public/
-
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/public/index.html
1.24KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/README.md
303B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/src/
-
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/src/App.css
145B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/src/App.js
1.19KB
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/src/App.test.js
248B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/src/index.css
36B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/src/index.js
226B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/src/JSONEditorDemo.css
63B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/react_demo/src/JSONEditorDemo.js
741B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/requirejs_demo/
-
一款网页版JSON编辑器源码/jsoneditor-develop/examples/requirejs_demo/requirejs_demo.html
515B
一款网页版JSON编辑器源码/jsoneditor-develop/examples/requirejs_demo/scripts/
-
一款网页版JSON编辑器源码/jsoneditor-develop/examples/requirejs_demo/scripts/main.js
639B
一款网页版JSON编辑器源码/jsoneditor-develop/greenkeeper.json
193B
一款网页版JSON编辑器源码/jsoneditor-develop/gulpfile.js
6.07KB
一款网页版JSON编辑器源码/jsoneditor-develop/HISTORY.md
53.02KB
一款网页版JSON编辑器源码/jsoneditor-develop/index.js
46B
一款网页版JSON编辑器源码/jsoneditor-develop/LICENSE
9.93KB
一款网页版JSON编辑器源码/jsoneditor-develop/misc/
-
一款网页版JSON编辑器源码/jsoneditor-develop/misc/browserstack.png
8.31KB
一款网页版JSON编辑器源码/jsoneditor-develop/misc/browserstack.svg
949.7KB
一款网页版JSON编辑器源码/jsoneditor-develop/misc/codeeditor.png
16.02KB
一款网页版JSON编辑器源码/jsoneditor-develop/misc/how_to_publish.md
1.25KB
一款网页版JSON编辑器源码/jsoneditor-develop/misc/jsoneditor.png
20.7KB
一款网页版JSON编辑器源码/jsoneditor-develop/misc/todo.txt
2.32KB
一款网页版JSON编辑器源码/jsoneditor-develop/misc/声明.txt
2.67KB
一款网页版JSON编辑器源码/jsoneditor-develop/misc/请添加阿影微信【防失联】.html
324B
一款网页版JSON编辑器源码/jsoneditor-develop/misc/阿影博客.html
5.62KB
一款网页版JSON编辑器源码/jsoneditor-develop/NOTICE
614B
一款网页版JSON编辑器源码/jsoneditor-develop/package-lock.json
638.71KB
一款网页版JSON编辑器源码/jsoneditor-develop/package.json
1.92KB
一款网页版JSON编辑器源码/jsoneditor-develop/README.md
6.88KB
一款网页版JSON编辑器源码/jsoneditor-develop/SECURITY.md
210B
一款网页版JSON编辑器源码/jsoneditor-develop/src/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/docs/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/docs/which files do I need.md
1.3KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/ace/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/ace/index.js
775B
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/ace/theme-jsoneditor.js
4.37KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/appendNodeFactory.js
6.62KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/assets/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/assets/jsonlint/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/assets/jsonlint/jsonlint.js
15.18KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/assets/jsonlint/README.md
576B
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/assets/selectr/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/assets/selectr/README.md
187B
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/assets/selectr/selectr.js
56.72KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/assets/selectr/selectr.scss
9.86KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/autocomplete.js
13.73KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/constants.js
214B
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/ContextMenu.js
14.07KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/createAbsoluteAnchor.js
2.96KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/ErrorTable.js
7.17KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/FocusTracker.js
3.32KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/generated/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/generated/.gitignore
1B
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/header.js
989B
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/Highlighter.js
1.74KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/History.js
1.52KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/i18n.js
48.37KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/jmespathQuery.js
1.95KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/JSONEditor.js
18.74KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/jsonUtils.js
4.8KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/ModeSwitcher.js
3.14KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/Node.js
132.39KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/NodeHistory.js
9.67KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/polyfills.js
1.73KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/previewmode.js
17.74KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/SchemaTextCompleter.js
8.13KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/SearchBox.js
8.57KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/showMoreNodeFactory.js
4.5KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/showSortModal.js
4.18KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/showTransformModal.js
11.26KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/textmode.js
30.9KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/treemode.js
51.74KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/TreePath.js
4.15KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/tryRequireAjv.js
165B
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/tryRequireThemeJsonEditor.js
143B
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/types.js
520B
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/util.js
34.44KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/validationUtils.js
1.38KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/vanilla-picker/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/js/vanilla-picker/index.js
316B
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/img/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/img/description.txt
291B
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/img/jsoneditor-icons.svg
30.74KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/
-
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor.scss
356B
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/_autocomplete.scss
647B
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/_contextmenu.scss
9.9KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/_editor.scss
12.93KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/_menu.scss
3.08KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/_navigationbar.scss
397B
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/_reset.scss
839B
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/_searchbox.scss
1.31KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/_statusbar.scss
1.12KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/_treepath.scss
1.01KB
一款网页版JSON编辑器源码/jsoneditor-develop/src/scss/jsoneditor/_variables.scss
1.52KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/
-
一款网页版JSON编辑器源码/jsoneditor-develop/test/couchdbeditor.html
2.4KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/data/
-
一款网页版JSON编辑器源码/jsoneditor-develop/test/data/jsons.js
937B
一款网页版JSON编辑器源码/jsoneditor-develop/test/data/schemas.js
3.12KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/jsonUtils.test.js
2.47KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/Node.test.js
16.63KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/SchemaTextCompleter.test.js
2.62KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/setup.js
617B
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_bootstrap.html
1.28KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_build.html
3.4KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_build_min.html
1.23KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_code_mode.html
1.89KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_color_picker.html
1.98KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_destroy.html
1.74KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_enum.html
1.26KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_enum_2.html
2.93KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_focus_tracker.html
2.1KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_get_inner_text.html
2.32KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_large_array.html
1.69KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_materialize.html
1.82KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_minimalist_min.html
1.24KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_popup_anchor.html
3.06KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_preview_load_save.html
2.04KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_schema.html
2.38KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/test_update.html
2.48KB
一款网页版JSON编辑器源码/jsoneditor-develop/test/util.test.js
16.37KB
一款网页版JSON编辑器源码/jsoneditor-develop/声明.txt
2.67KB
一款网页版JSON编辑器源码/jsoneditor-develop/请添加阿影微信【防失联】.html
324B
一款网页版JSON编辑器源码/jsoneditor-develop/阿影博客.html
5.62KB

资源内容介绍

一款网页版JSON编辑器源码,JSON 编辑器是一个基于 Web 的工具,用于查看、编辑、格式化和验证 JSON。它具有树编辑器、代码编辑器和纯文本编辑器等多种模式。编辑器可以用作您自己的 Web 应用程序中的组件。它可以作为 CommonJS 模块、AMD 模块或常规 javascript 文件加载。支持所有主流浏览器:QQ、Chrome、Firefox、Safari、Edge等…。支持的浏览器:Chrome、Firefox、Safari、Edge。
# JSON Editor[![Version](https://img.shields.io/npm/v/jsoneditor.svg)](https://www.npmjs.com/package/jsoneditor)[![Downloads](https://img.shields.io/npm/dm/jsoneditor.svg)](https://www.npmjs.com/package/jsoneditor)[![Maintenance](https://img.shields.io/maintenance/yes/2024.svg)](https://github.com/josdejong/jsoneditor/pulse)[![License](https://img.shields.io/github/license/josdejong/jsoneditor.svg)](https://github.com/josdejong/jsoneditor/blob/master/LICENSE)[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjosdejong%2Fjsoneditor.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjosdejong%2Fjsoneditor?ref=badge_shield)JSON Editor is a web-based tool to view, edit, format, and validate JSON. It has various modes such as a tree editor, a code editor, and a plain text editor. The editor can be used as a component in your own web application. It can be loaded as CommonJS module, AMD module, or as a regular javascript file.The library was originally developed as core component of the popular web application https://jsoneditoronline.org and has been open sourced since then.Supported browsers: Chrome, Firefox, Safari, Edge.<img alt="json editor" src="https://raw.github.com/josdejong/jsoneditor/master/misc/jsoneditor.png"> &nbsp; <img alt="code editor" src="https://raw.github.com/josdejong/jsoneditor/master/misc/codeeditor.png">Cross browser testing for JSONEditor is generously provided by <a href="https://www.browserstack.com" target="_blank">BrowserStack</a><a href="https://www.browserstack.com" target="_blank"><img alt="BrowserStack" src="https://raw.github.com/josdejong/jsoneditor/master/misc/browserstack.png"></a>## Successor: svelte-jsoneditorThis library [`jsoneditor`](https://github.com/josdejong/jsoneditor) has a successor: [`svelte-jsoneditor`](https://github.com/josdejong/svelte-jsoneditor). The new editor is not a one-to-one replacement, so there may be reasons to stick with `jsoneditor`. The main differences between the two [are described here](https://github.com/josdejong/svelte-jsoneditor#differences-between-josdejongsvelte-jsoneditor-and-josdejongjsoneditor).## FeaturesJSONEditor has various modes, with the following features.### Tree mode- Change, add, move, remove, and duplicate fields and values.- Sort arrays and objects.- Transform JSON using [JMESPath](http://jmespath.org/) queries.- Colorized code.- Color picker.- Search & highlight text in the tree view.- Undo and redo all actions.- JSON schema validation (powered by [ajv](https://github.com/epoberezkin/ajv)).### Code mode- Colorized code (powered by [Ace](https://ace.c9.io)).- Inspect JSON (powered by [Ace](https://ace.c9.io)).- Format and compact JSON.- Repair JSON.- JSON schema validation (powered by [ajv](https://github.com/epoberezkin/ajv)).### Text mode- Format and compact JSON.- Repair JSON.- JSON schema validation (powered by [ajv](https://github.com/epoberezkin/ajv)).### Preview mode- Handle large JSON documents up to 500 MiB.- Transform JSON using [JMESPath](http://jmespath.org/) queries.- Format and compact JSON.- Repair JSON.- JSON schema validation (powered by [ajv](https://github.com/epoberezkin/ajv)).## Documentation- Documentation: - [API](https://github.com/josdejong/jsoneditor/tree/master/docs/api.md) - [Usage](https://github.com/josdejong/jsoneditor/tree/master/docs/usage.md) - [Shortcut keys](https://github.com/josdejong/jsoneditor/tree/master/docs/shortcut_keys.md)- [Examples](https://github.com/josdejong/jsoneditor/tree/master/examples)- [Source](https://github.com/josdejong/jsoneditor)- [History](https://github.com/josdejong/jsoneditor/blob/master/HISTORY.md)## Installwith npm (recommended): npm install jsoneditorAlternatively, you can use another JavaScript package manager like https://yarnpkg.com/, or a CDN such as https://cdnjs.com/ or https://www.jsdelivr.com/.## Use> Note that in the following example, you'll have to change the urls `jsoneditor/dist/jsoneditor.min.js` and `jsoneditor/dist/jsoneditor.min.css` to match the place where you've downloaded the library, or fill in the URL of the CDN you're using.```html<!DOCTYPE HTML><html lang="en"><head> <!-- when using the mode "code", it's important to specify charset utf-8 --> <meta charset="utf-8"> <link href="jsoneditor/dist/jsoneditor.min.css" rel="stylesheet" type="text/css"> <script src="jsoneditor/dist/jsoneditor.min.js"></script></head><body> <div id="jsoneditor" style="width: 400px; height: 400px;"></div> <script> // create the editor const container = document.getElementById("jsoneditor") const options = {} const editor = new JSONEditor(container, options) // set json const initialJson = { "Array": [1, 2, 3], "Boolean": true, "Null": null, "Number": 123, "Object": {"a": "b", "c": "d"}, "String": "Hello World" } editor.set(initialJson) // get json const updatedJson = editor.get() </script></body></html>```## BuildThe code of the JSON Editor is located in the folder `./src`. To build jsoneditor:- Install dependencies: ``` npm install ```- Build JSON Editor: ``` npm run build ``` This will generate the files `./jsoneditor.js`, `./jsoneditor.css`, and minified versions in the dist of the project.- To automatically build when a source file has changed: ``` npm start ``` This will update `./jsoneditor.js` and `./jsoneditor.css` in the dist folder on every change, but it will **NOT** update the minified versions as that's an expensive operation.## TestRun unit tests:```npm test```Run code linting ([JavaScript Standard Style](https://standardjs.com/)):```npm run lint```## Custom buildsThe source code of JSONEditor consists of CommonJS modules. JSONEditor can be bundled in a customized way using a module bundler like [browserify](http://browserify.org/) or [webpack](http://webpack.github.io/). First, install all dependencies of jsoneditor: npm installTo create a custom bundle of the source code using browserify: browserify ./index.js -o ./jsoneditor.custom.js -s JSONEditorThe Ace editor, used in mode `code`, accounts for about one third of the totalsize of the library. To exclude the Ace editor from the bundle: browserify ./index.js -o ./jsoneditor.custom.js -s JSONEditor -x brace -x brace/mode/json -x brace/ext/searchboxTo minify the generated bundle, use [uglifyjs](https://github.com/mishoo/UglifyJS2): uglifyjs ./jsoneditor.custom.js -o ./jsoneditor.custom.min.js -m -c## License`jsoneditor` is released as open source under the permissive the [Apache 2.0 license](LICENSE.md).**If you are using jsoneditor commercially, there is a _social_ (but no legal) expectation that you help fund its maintenance. [Start here](https://github.com/sponsors/josdejong).**

用户评论 (0)

发表评论

captcha