Allow for an option to send more verbose response in JSon so that consuming application can have ease of development.
Call based toggle for suppressing the meta information in response data. To improve performance.
Solution :
Two header are implemented
"verbose" to respect the new format response - true=New format, false/header absent=Old format
"nometa" to toggle the meta included in response - true=meta info excluded, false/header absent=meta info included.
If the Restful API returning single object
{ "status": "Ok" / "Error" "value":{ } "error":{ "errorNo":"ABX011110", -- if any error number is there "errorText":"The name value can't be be empty to process data." -- error description or text } }
If the Restful API returning multiple objects
{ "status": "Ok" / "Error" "value":[ ] "count": "error":{ } }
Solution : Two header are implemented "verbose" to respect the new format response - true=New format, false/header absent=Old format "nometa" to toggle the meta included in response - true=meta info excluded, false/header absent=meta info included.
If the Restful API returning single object
{ "status": "Ok" / "Error" "value":{ } "error":{ "errorNo":"ABX011110", -- if any error number is there "errorText":"The name value can't be be empty to process data." -- error description or text } }
If the Restful API returning multiple objects{ "status": "Ok" / "Error" "value":[ ] "count": "error":{ } }