Get started with json-editor CDN
MIT licensed
JSON Editor is a tool for interactively editing and validating JSON data.
Tags:- json
- schema
- jsonschema
- editor
Stable version
Copied!
How to start using json-editor CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with json-editor CDN - cdnhub.io</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jsoneditor@2.14.1/dist/jsoneditor.min.css">
<script src="https://cdn.jsdelivr.net/npm/jsoneditor@2.14.1/dist/jsoneditor.min.js"></script>
<script src="https://cdn.cdnhub.io/json-editor/2.14.1/jsoneditor.js"></script>
</head>
<body>
<div id="jsonEditor"></div>
<script>
const jsonEditor = new JSONEditor({ container: '#jsonEditor' });
const json = {
name: 'John Doe',
age: 30,
hobbies: ['reading', 'swimming']
};
jsonEditor.set(json);
document.querySelector('#save').addEventListener('click', () => {
const savedJson = jsonEditor.get();
console.log('Saved JSON:', savedJson);
});
</script>
<button id="save">Save JSON</button>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
All versions
0.6
0.6.10
0.6.11
0.6.12
0.6.13
0.6.14
0.6.15
0.6.16
0.6.17
0.6.18
0.6.19
0.6.9
0.7.0
0.7.1
0.7.10
0.7.11
0.7.12
0.7.13
0.7.14
0.7.15
0.7.16
0.7.17
0.7.18
0.7.19
0.7.2
0.7.20
0.7.21
0.7.22
0.7.23
0.7.24
0.7.25
0.7.26
0.7.27
0.7.28
0.7.3
0.7.4
0.7.5
0.7.6
0.7.7
0.7.8
0.7.9
1.0.0
1.1.0
1.1.0-beta.0
1.1.0-beta.1
1.1.0-beta.2
1.1.0-beta.3
1.1.0-beta.4
1.2.0
1.2.1
1.3.0
1.3.1
1.3.2
1.3.3
1.3.4
1.3.5
1.4.0-beta.0
2.0.0
2.0.0-alpha.0
2.0.0-alpha.1
2.1.0
2.10.0
2.10.1
2.11.0
2.12.0
2.13.0
2.13.1
2.13.2
2.14.0
2.14.1
2.15.0
*** 2.15.1
2.2.0
2.2.1
2.3.0
2.4.0
2.5.0
2.5.1
2.5.2
2.5.3
2.5.4
2.6.0
2.6.1
2.7.0
2.8.0
2.9.0
2.9.0-beta.0
2.9.0-beta.1
2.9.1