so I am new to JSON, and have been experimenting around with some possibilities. One thing I was wondering: Is there a way to place 'JSON object's inside of 'JSON objects'? I want to assume this can be done, and would like it to be possible as it could be very useful, but all attempts at the syntax has failed me. Here is an example of the standard:
var Person = {
name: 'John',
age: 21,
alive: true,
siblings: [
{
name: 'Andrew',
age: 23,
alive: true
},
{
name: 'Christine',
age: 19,
alive: true
}
]
}
Now, is there a way to do something like the following?
var Andrew = {
name: 'Andrew',
age: 21,
alive: true
}
var Person = {
name: 'John',
age: 21,
alive: true,
siblings: [
{
Andrew
},
{
name: 'Christine',
age: 19,
alive: true
}
]
}
If so, what is the proper way to do this? Or can it simply, not be done?
edit: What I really mean is: Is JSON able to encode objects which have objects inside of them?