@json-editor/json-editor 2.11.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +1 -1
- package/CHANGELOG.md +19 -0
- package/README.md +90 -6
- package/README_ADDON.md +5 -1
- package/dist/jsoneditor.js +1 -1
- package/dist/jsoneditor.js.LICENSE.txt +1 -1
- package/dist/nonmin/jsoneditor.js +417 -227
- package/dist/nonmin/jsoneditor.js.map +1 -1
- package/docs/cleave.html +1 -1
- package/docs/datetime.html +1 -1
- package/docs/describedby.html +1 -1
- package/docs/index.html +66 -14
- package/docs/meta_schema.json +16 -1
- package/docs/radio.html +1 -1
- package/docs/scripts/ajv-validator.js +8695 -0
- package/docs/select2.html +1 -1
- package/docs/selectize.html +2 -5
- package/docs/signature.html +12 -11
- package/docs/wysiwyg.html +1 -1
- package/package.json +1 -1
- package/src/core.js +10 -1
- package/src/defaults.js +3 -1
- package/src/editor.js +19 -1
- package/src/editors/array/selectize.js +0 -2
- package/src/editors/array.js +24 -13
- package/src/editors/base64.js +9 -0
- package/src/editors/button.js +8 -2
- package/src/editors/integer.js +3 -2
- package/src/editors/multiple.js +3 -0
- package/src/editors/number.js +4 -2
- package/src/editors/object.js +71 -3
- package/src/editors/signature.js +16 -16
- package/src/editors/simplemde.js +2 -1
- package/src/editors/string.js +4 -0
- package/src/editors/table.js +17 -14
- package/src/resolvers.js +13 -6
- package/src/schemaloader.js +13 -0
- package/src/theme.js +4 -0
- package/src/themes/bootstrap3.js +6 -0
- package/src/themes/bootstrap4.js +6 -0
- package/src/themes/bootstrap5.js +6 -0
- package/src/validator.js +28 -0
- package/tests/codeceptjs/codecept.json +1 -1
- package/tests/codeceptjs/constrains/contains_test.js +3 -2
- package/tests/codeceptjs/constrains/dependentRequired_test.js +33 -0
- package/tests/codeceptjs/constrains/dependentSchemas_test.js +1 -0
- package/tests/codeceptjs/core_test.js +14 -4
- package/tests/codeceptjs/editors/advanced_test.js +1 -1
- package/tests/codeceptjs/editors/array_test.js +59 -0
- package/tests/codeceptjs/editors/autocomplete_test.js +3 -1
- package/tests/codeceptjs/editors/object_test.js +20 -0
- package/tests/codeceptjs/editors/tabs_test.js +1 -1
- package/tests/codeceptjs/issues/issue-gh-1330_test.js +8 -0
- package/tests/codeceptjs/issues/issue-gh-1338_test.js +2 -0
- package/tests/codeceptjs/issues/issue-gh-1364_test.js +13 -0
- package/tests/codeceptjs/issues/issue-gh-1367_test.js +11 -0
- package/tests/codeceptjs/issues/issue-gh-1383_test.js +9 -0
- package/tests/codeceptjs/issues/issue-gh-1384_test.js +9 -0
- package/tests/codeceptjs/issues/issue-gh-1410_test.js +13 -0
- package/tests/codeceptjs/issues/issue-gh-1422_test.js +9 -0
- package/tests/codeceptjs/issues/issue-gh-1431_test.js +12 -0
- package/tests/codeceptjs/issues/issue-gh-1439_test.js +12 -0
- package/tests/docker-compose-local.yml +4 -0
- package/tests/pages/array-header-template.html +59 -0
- package/tests/pages/array-selectize-create.html +62 -0
- package/tests/pages/array-table-responsive.html +65 -0
- package/tests/pages/button-icons.html +1 -1
- package/tests/pages/button_state_mode_1.html +34 -0
- package/tests/pages/button_state_mode_2.html +35 -0
- package/tests/pages/dependentRequired.html +71 -0
- package/tests/pages/issues/issue-gh-1330.html +52 -0
- package/tests/pages/issues/issue-gh-1364.html +64 -0
- package/tests/pages/issues/issue-gh-1367.html +49 -0
- package/tests/pages/issues/issue-gh-1383.html +31 -0
- package/tests/pages/issues/issue-gh-1383.json +14 -0
- package/tests/pages/issues/issue-gh-1384.html +31 -0
- package/tests/pages/issues/issue-gh-1384.json +36 -0
- package/tests/pages/issues/issue-gh-1410.html +57 -0
- package/tests/pages/issues/issue-gh-1422.html +68 -0
- package/tests/pages/issues/issue-gh-1431.html +49 -0
- package/tests/pages/issues/issue-gh-1439.html +69 -0
- package/tests/pages/keep_only_existing_values.html +1 -1
- package/tests/pages/load-events.html +60 -0
- package/tests/pages/meta-schema.html +16 -2
- package/tests/pages/meta_schema.json +5 -1
- package/tests/pages/object-case-sensitive-property-search-false.html +41 -0
- package/tests/pages/object-case-sensitive-property-search-true.html +41 -0
- package/dist/dev/jsoneditor.js +0 -3687
- package/dist/jsoneditor.js.map +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>GitHub Issue 1422</title>
|
|
6
|
+
<link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
|
7
|
+
<link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
|
|
8
|
+
<script src="../../../dist/jsoneditor.js"></script>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div class="container">
|
|
12
|
+
<textarea class="form-control" id="value" cols="30" rows="10"></textarea>
|
|
13
|
+
<a href="https://github.com/json-editor/json-editor/issues/1422">GitHub Issue 1422</a>
|
|
14
|
+
<div id='editor_holder'></div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
var value = document.querySelector('#value')
|
|
19
|
+
var defaultSchema = {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"required": [
|
|
22
|
+
"req",
|
|
23
|
+
"req_with_default"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"req": {
|
|
27
|
+
"type": "integer",
|
|
28
|
+
"minimum": 1,
|
|
29
|
+
"maximum": 10
|
|
30
|
+
},
|
|
31
|
+
"opt": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"minimum": 1,
|
|
34
|
+
"maximum": 10
|
|
35
|
+
},
|
|
36
|
+
"req_with_default": {
|
|
37
|
+
"type": "integer",
|
|
38
|
+
"default": 5,
|
|
39
|
+
"minimum": 1,
|
|
40
|
+
"maximum": 10
|
|
41
|
+
},
|
|
42
|
+
"opt_with_default": {
|
|
43
|
+
"type": "integer",
|
|
44
|
+
"default": 5,
|
|
45
|
+
"minimum": 1,
|
|
46
|
+
"maximum": 10
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
var editor = new JSONEditor(document.getElementById('editor_holder'),{
|
|
52
|
+
iconlib: 'fontawesome5',
|
|
53
|
+
schema: defaultSchema,
|
|
54
|
+
show_errors: 'always',
|
|
55
|
+
theme: 'bootstrap4',
|
|
56
|
+
use_default_values: false,
|
|
57
|
+
startval: {
|
|
58
|
+
"req": 5,
|
|
59
|
+
"opt": 5
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
editor.on('change', function () {
|
|
64
|
+
value.value = JSON.stringify(editor.getValue())
|
|
65
|
+
})
|
|
66
|
+
</script>
|
|
67
|
+
</body>
|
|
68
|
+
</html>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>GitHub Issue 1431</title>
|
|
6
|
+
<link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
|
7
|
+
<link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
|
|
8
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
|
|
9
|
+
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
|
|
10
|
+
<script src="../../../dist/jsoneditor.js"></script>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div class="container">
|
|
14
|
+
<textarea class="form-control" id="value" cols="30" rows="10"></textarea>
|
|
15
|
+
<a href="https://github.com/json-editor/json-editor/issues/1431">GitHub Issue 1431</a>
|
|
16
|
+
<div id='editor_holder'></div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
var value = document.querySelector('#value')
|
|
21
|
+
var defaultSchema = {
|
|
22
|
+
"title": "Person",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": [
|
|
25
|
+
"name"
|
|
26
|
+
],
|
|
27
|
+
"properties": {
|
|
28
|
+
"name": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"format": "markdown"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var editor = new JSONEditor(document.getElementById('editor_holder'), {
|
|
36
|
+
iconlib: 'fontawesome5',
|
|
37
|
+
schema: defaultSchema,
|
|
38
|
+
show_errors: 'always',
|
|
39
|
+
theme: 'bootstrap4'
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
editor.on('change', function () {
|
|
43
|
+
value.value = JSON.stringify(editor.getValue())
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
window.addEventListener('click', (e) => {console.log(e.target)})
|
|
47
|
+
</script>
|
|
48
|
+
</body>
|
|
49
|
+
</html>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>GitHub Issue 1439</title>
|
|
6
|
+
<link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
|
7
|
+
<link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
|
|
8
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
|
|
9
|
+
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
|
|
10
|
+
<script src="../../../dist/jsoneditor.js"></script>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div class="container">
|
|
14
|
+
<textarea class="form-control" id="value" cols="30" rows="10"></textarea>
|
|
15
|
+
<a href="https://github.com/json-editor/json-editor/issues/1439">GitHub Issue 1439</a>
|
|
16
|
+
<div id='editor_holder'></div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
var value = document.querySelector('#value')
|
|
21
|
+
var defaultSchema = {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"wrong": {
|
|
25
|
+
"type": "button",
|
|
26
|
+
"title": "Search",
|
|
27
|
+
"options": {
|
|
28
|
+
"button": {
|
|
29
|
+
"icon": "search",
|
|
30
|
+
"action": "myAction",
|
|
31
|
+
"validated": true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"correct": {
|
|
36
|
+
"format": "button",
|
|
37
|
+
"options": {
|
|
38
|
+
"button": {
|
|
39
|
+
"text": "Button text",
|
|
40
|
+
"icon": "search",
|
|
41
|
+
"action": "myAction",
|
|
42
|
+
"validated": true
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
JSONEditor.defaults.callbacks = {
|
|
50
|
+
"button" : {
|
|
51
|
+
"myAction" : function () {
|
|
52
|
+
alert('Button action')
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
var editor = new JSONEditor(document.getElementById('editor_holder'), {
|
|
58
|
+
iconlib: 'fontawesome5',
|
|
59
|
+
schema: defaultSchema,
|
|
60
|
+
show_errors: 'always',
|
|
61
|
+
theme: 'bootstrap4'
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
editor.on('change', function () {
|
|
65
|
+
value.value = JSON.stringify(editor.getValue())
|
|
66
|
+
})
|
|
67
|
+
</script>
|
|
68
|
+
</body>
|
|
69
|
+
</html>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<html lang="de">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8"/>
|
|
5
|
-
<title>
|
|
5
|
+
<title>keep_only_existing_values</title>
|
|
6
6
|
<link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
|
7
7
|
<link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
|
|
8
8
|
<script src="../../dist/jsoneditor.js"></script>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<title>Load events</title>
|
|
6
|
+
<script src="../../dist/jsoneditor.js"></script>
|
|
7
|
+
<link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
|
8
|
+
<link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
|
|
12
|
+
<div class="container">
|
|
13
|
+
<div id="events-container"></div>
|
|
14
|
+
<div id='editor-container'></div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
const eventsContainer = document.querySelector('#events-container')
|
|
19
|
+
const editorContainer = document.querySelector('#editor-container')
|
|
20
|
+
const schema = {
|
|
21
|
+
"title": "Load Events",
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"personA": {
|
|
25
|
+
"$ref": "../fixtures/basic_person.json"
|
|
26
|
+
},
|
|
27
|
+
"personB": {
|
|
28
|
+
"$ref": "../fixtures/person.json"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const editor = new JSONEditor(editorContainer, {
|
|
34
|
+
schema: schema,
|
|
35
|
+
theme: 'bootstrap4',
|
|
36
|
+
iconlib: 'fontawesome',
|
|
37
|
+
disable_collapse: true,
|
|
38
|
+
disable_edit_json: true,
|
|
39
|
+
disable_properties: true,
|
|
40
|
+
ajax: true
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
editor.on('schemaLoaded', function (payload) {
|
|
44
|
+
const schemaUrl = document.createElement('pre')
|
|
45
|
+
const loadedSchema = document.createElement('pre')
|
|
46
|
+
schemaUrl.textContent = payload.schemaUrl
|
|
47
|
+
loadedSchema.textContent = JSON.stringify(payload.schema)
|
|
48
|
+
eventsContainer.appendChild(schemaUrl)
|
|
49
|
+
eventsContainer.appendChild(loadedSchema)
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
editor.on('allSchemasLoaded', function () {
|
|
53
|
+
const loaded = document.createElement('p')
|
|
54
|
+
loaded.textContent = 'All schemas loaded'
|
|
55
|
+
eventsContainer.appendChild(loaded)
|
|
56
|
+
})
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
</body>
|
|
60
|
+
</html>
|
|
@@ -144,8 +144,10 @@
|
|
|
144
144
|
'pgsql',
|
|
145
145
|
'php',
|
|
146
146
|
'python',
|
|
147
|
+
'prql',
|
|
147
148
|
'r',
|
|
148
149
|
'ruby',
|
|
150
|
+
'rust',
|
|
149
151
|
'sass',
|
|
150
152
|
'scala',
|
|
151
153
|
'scss',
|
|
@@ -153,10 +155,12 @@
|
|
|
153
155
|
'sql',
|
|
154
156
|
'stylus',
|
|
155
157
|
'svg',
|
|
158
|
+
'typescript',
|
|
156
159
|
'twig',
|
|
157
160
|
'vbscript',
|
|
158
161
|
'xml',
|
|
159
|
-
'yaml'
|
|
162
|
+
'yaml',
|
|
163
|
+
'zig'
|
|
160
164
|
]
|
|
161
165
|
},
|
|
162
166
|
'minLength': {
|
|
@@ -492,7 +496,6 @@
|
|
|
492
496
|
'type': 'string',
|
|
493
497
|
'propertyOrder': 4
|
|
494
498
|
},
|
|
495
|
-
|
|
496
499
|
'enum': {
|
|
497
500
|
'type': 'array',
|
|
498
501
|
'minItems': 1,
|
|
@@ -500,6 +503,17 @@
|
|
|
500
503
|
'propertyOrder': 50,
|
|
501
504
|
'format': 'table'
|
|
502
505
|
},
|
|
506
|
+
'const': {
|
|
507
|
+
'type': [
|
|
508
|
+
'object',
|
|
509
|
+
'array',
|
|
510
|
+
'string',
|
|
511
|
+
'number',
|
|
512
|
+
'integer',
|
|
513
|
+
'boolean',
|
|
514
|
+
'null'
|
|
515
|
+
]
|
|
516
|
+
},
|
|
503
517
|
'enumSource': {
|
|
504
518
|
'oneOf': [
|
|
505
519
|
{
|
|
@@ -122,8 +122,10 @@
|
|
|
122
122
|
"pgsql",
|
|
123
123
|
"php",
|
|
124
124
|
"python",
|
|
125
|
+
"prql",
|
|
125
126
|
"r",
|
|
126
127
|
"ruby",
|
|
128
|
+
"rust",
|
|
127
129
|
"sass",
|
|
128
130
|
"scala",
|
|
129
131
|
"scss",
|
|
@@ -131,10 +133,12 @@
|
|
|
131
133
|
"sql",
|
|
132
134
|
"stylus",
|
|
133
135
|
"svg",
|
|
136
|
+
"typescript",
|
|
134
137
|
"twig",
|
|
135
138
|
"vbscript",
|
|
136
139
|
"xml",
|
|
137
|
-
"yaml"
|
|
140
|
+
"yaml",
|
|
141
|
+
"zig"
|
|
138
142
|
]
|
|
139
143
|
},
|
|
140
144
|
"minLength": {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>Object case sensitive property search</title>
|
|
6
|
+
<link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
|
7
|
+
<link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
|
|
8
|
+
<script src="../../../dist/jsoneditor.js"></script>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div class="container">
|
|
12
|
+
<a href="https://github.com/json-editor/json-editor/issues/1400">Object case sensitive property search</a>
|
|
13
|
+
<div id='editor_holder'></div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
var defaultSchema = {
|
|
18
|
+
"title": "Person",
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"a": {
|
|
22
|
+
"title": "aaa",
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"b": {
|
|
26
|
+
"title": "AAA",
|
|
27
|
+
"type": "string"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var editor = new JSONEditor(document.getElementById('editor_holder'),{
|
|
33
|
+
iconlib: 'fontawesome5',
|
|
34
|
+
schema: defaultSchema,
|
|
35
|
+
show_errors: 'always',
|
|
36
|
+
theme: 'bootstrap4',
|
|
37
|
+
case_sensitive_property_search: false
|
|
38
|
+
});
|
|
39
|
+
</script>
|
|
40
|
+
</body>
|
|
41
|
+
</html>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>Object case sensitive property search</title>
|
|
6
|
+
<link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
|
7
|
+
<link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css">
|
|
8
|
+
<script src="../../../dist/jsoneditor.js"></script>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div class="container">
|
|
12
|
+
<a href="https://github.com/json-editor/json-editor/issues/1400">Object case sensitive property search</a>
|
|
13
|
+
<div id='editor_holder'></div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
var defaultSchema = {
|
|
18
|
+
"title": "Person",
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"a": {
|
|
22
|
+
"title": "aaa",
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"b": {
|
|
26
|
+
"title": "AAA",
|
|
27
|
+
"type": "string"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var editor = new JSONEditor(document.getElementById('editor_holder'),{
|
|
33
|
+
iconlib: 'fontawesome5',
|
|
34
|
+
schema: defaultSchema,
|
|
35
|
+
show_errors: 'always',
|
|
36
|
+
theme: 'bootstrap4',
|
|
37
|
+
case_sensitive_property_search: true
|
|
38
|
+
});
|
|
39
|
+
</script>
|
|
40
|
+
</body>
|
|
41
|
+
</html>
|