Remove semicolons from examples

This commit is contained in:
jos 2016-10-28 11:46:46 +02:00
parent 099c5ee8ba
commit 9722414728
4 changed files with 17 additions and 17 deletions

View File

@ -42,21 +42,21 @@
return { return {
field: false, field: false,
value: true value: true
}; }
default: default:
return true; return true;
} }
} }
}; }
var json = { var json = {
_id: 123456, _id: 123456,
name: 'John', name: 'John',
age: 32 age: 32
}; }
var editor = jsoneditor(container, options, json); var editor = jsoneditor(container, options, json)
</script> </script>
</body> </body>
</html> </html>

View File

@ -32,7 +32,7 @@
<script> <script>
// create the editor // create the editor
var container = document.getElementById('jsoneditor'); var container = document.getElementById('jsoneditor')
var options = { var options = {
modes: ['text', 'tree'] modes: ['text', 'tree']
}; };
@ -43,8 +43,8 @@
'number': 123, 'number': 123,
'object': {'a': 'b', 'c': 'd'}, 'object': {'a': 'b', 'c': 'd'},
'string': 'Hello World' 'string': 'Hello World'
}; }
var editor = jsoneditor(container, options, json); var editor = jsoneditor(container, options, json)
</script> </script>
</body> </body>
</html> </html>

View File

@ -49,22 +49,22 @@
} }
}, },
"required": ["firstName", "lastName"] "required": ["firstName", "lastName"]
}; }
var json = { var json = {
firstName: 'John', firstName: 'John',
lastName: 'Doe', lastName: 'Doe',
gender: null, gender: null,
age: 28 age: 28
}; }
var options = { var options = {
schema: schema schema: schema
}; }
// create the editor // create the editor
var container = document.getElementById('jsoneditor'); var container = document.getElementById('jsoneditor')
var editor = jsoneditor(container, options, json); var editor = jsoneditor(container, options, json)
</script> </script>
</body> </body>
</html> </html>

View File

@ -14,13 +14,13 @@ require([module], function (jsoneditor) {
'number': 123, 'number': 123,
'object': {'a': 'b', 'c': 'd'}, 'object': {'a': 'b', 'c': 'd'},
'string': 'Hello World' 'string': 'Hello World'
}; }
editor.set(json) editor.set(json)
}; }
// get json // get json
document.getElementById('getJSON').onclick = function () { document.getElementById('getJSON').onclick = function () {
var json = editor.get(); var json = editor.get()
alert(JSON.stringify(json, null, 2)) alert(JSON.stringify(json, null, 2))
}; }
}); })