For json, what is considered best practice when you have an array of objects? Do you name the array and then put in the objects or do you add an additional name to each of the objects within the array?
Example #1 (Car is named inside of cars, but requires the additional "{}":
{
"cars": [
{
"car": {}
},
{
"car": {}
}
]
}
Example #2: Car is not named. Simply an object inside of cars array:
{
"cars": [
{},
{}
]
}
Trying to work on json spec with another party and wanted to make sure we are properly specifying the json schemas.