Usually, the JSON responses sent from RESTful services have a common structure to follow,
{
"data" : {
"someprop" : "somevalue",
....
},
"error" : [ ]
}
Or
{
"data" : {},
"error" : [
{
"code" : "4000",
"message" : "User not authorized"
}
]
}
Shall we follow the same?