In the official Java EE tutorial said that JSON defines six data types: string, number, object, array, true, false and null. Consider the following:
{
"firstName": "Duke",
"lastName": "Java",
"age": 18,
"streetAddress": "100 Internet Dr",
"city": "JavaTown",
"state": "JA",
"postalCode": "12345",
"phoneNumbers": [
{ "Mobile": "111-111-1111" },
{ "Home": "222-222-2222" }
]
}
From, for example, pair "firstName": "Duke"
how we can define what's type of the value? As i understood type of the name it the name-value pair is string
always.