How to use JSON
Syntax
This is an example of an object having 3 attributes defined:
name - String (Text)
age - Number
isAdult - Boolean (True/False)
chores - List<String> (A list of String)
A String will be quoted with "
on each side.
A Number can just be written directly.
A Boolean must be either true
or false
(in lower case).
A List must start and end with [
and ]
respectively, with elements spaced with a ,
.
It's what we mostly use as it's the most human readable.
Also, an object can contain another one:
Editor
Last updated