In most cases, JSON is in the format
{
color: "red",
value: "#f00"
}
or
[
{ color: "red", value: "#f00" },
{ color: "red", value: "#f00" }
]
And I want to ask a primitive type, like string, bool, int is also JSON?
I found the following link,
http://json-schema.org/latest/json-schema-core.html
http://www.json.org/
https://zh.wikipedia.org/wiki/JSON
https://www.ietf.org/rfc/rfc4627.txt
http://www.c-sharpcorner.com/uploadfile/3d39b4/data-types-in-json/
and
RFC4627 says:
JSON can represent four primitive types (strings, numbers, booleans, and null) and two structured types (objects and arrays).
A string is a sequence of zero or more Unicode characters [UNICODE].
An object is an unordered set of zero or more name / value pairs, where name is a string and value is a string, number, boolean, null, object or array.
- .
"" "" JavaScript.
, , boolean like
"a string"
100
true
JSON,
, ,
{ ASTRING : "astring" } - JSON,
"a string", , JSON,
, , , , , ,
, , JSON?
.
: JSON , ,
, , JSON ?
{ Message : "a message"},
, , , "a message"...?