Sha256: 7bf82c98fcb76cc8b6fa1436293c2065eb35c35dc2bef8e69cef4ed8a7435e13
Contents?: true
Size: 726 Bytes
Versions: 1
Compression:
Stored size: 726 Bytes
Contents
var module = "../../../jsoneditor"; require([module], function (jsoneditor) { // create the editor var container = document.getElementById("jsoneditor"); var editor = new jsoneditor.JSONEditor(container); // set json document.getElementById("setJSON").onclick = function () { var json = { "array": [1, 2, 3], "boolean": true, "null": null, "number": 123, "object": {"a": "b", "c": "d"}, "string": "Hello World" }; editor.set(json); }; // get json document.getElementById("getJSON").onclick = function () { var json = editor.get(); alert(JSON.stringify(json, null, 2)); }; });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bee_api-0.0.5 | vendor/examples/requirejs_demo/scripts/main.js |