Booth,
Just remember this all has to be name: value pairs The name can be
anything surrounded by quotes. A colon separates them and the values, to
keep it simple will be an object {} an array [] a string "string" or a
number 12345687890
So your example doesn't quite make sense because every name isn't
followed by a value and then a comma and another name:value pair
It starts with an object (wrong syntax) called "data" but then there is
a value of "aState" named "state". So, just to get you started:
"data":{ "state":"aState", [
but then you start an array *value* which has no name. So you would
need to give it a name first and then list the contents of the array.
Something like:
"demographics":["gender":"male",
But then once again you start another value (presumably an object {} )
without a name.
Basically if you are going to define a value or values, then you have to
give them a name. BTW, I know this is just an example but parens are
not used to denote a value of any kind in JSON. You'll mostly be
defining strings, numbers, objects {} and arrays [] but they always need
a name.....
"data":{ "state":"aState", [
"demographics":["gender":"male", ........
]
}
Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
Twitter - Sys_i_Geek IBM_i_Geek
On 3/12/2019 2:27 PM, Booth Martin wrote:
data: (state: aState[
gender: male (
age(name, street),
age(name, street).
age(name, street)
)
gender: female (
age(name, street),
age(name, street).
age(name, street)
)
)
(state: bState[
gender: male (
age(name, street),
age(name, street).
age(name, street)
)
gender: female (
age(name, street),
age(name, street).
age(name, street)
)
)
As an Amazon Associate we earn from qualifying purchases.