I am currently working on json api designing for my project. I have searched on internet and find that there are nearly two styles of json. One is like
{
"user":{
"id":12,
"name":"Jack",
"address":{
"city":"New York",
"post":"123456"
}
}
}
And the other is like:
{
"user.id":12,
"user.name":"Jack",
"user.address.city":"New York",
"user.address.post":"123456"
}
I think the first one is OK, but since the second one appears, there must be some reason. So I want to know the differences especially the performance differences between the two formats. And I've searched on google, stackoverflow and some other websites to find an answer. But I haven't got one that is particular. Of course, Why and when do we need to flatten JSON objects? shows some useful information, but still no performance comparison. I'd appreciate it if any one have good answers.