Last active
April 2, 2018 17:09
-
-
Save sunitparekh/605f12f9cbc1c66bb0053e227327fe4c to your computer and use it in GitHub Desktop.
JSON sample representing different responses for NULL and EMPTY values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Response with null and empty values -- NOT RECOMMENDED, JUST FOR REPRESENTATION PURPOSE -- | |
{ | |
"employeeId": 12345, | |
"firstName": "Sunit", | |
"lastName": "Parekh", | |
"mobile": null, | |
"addresses": [] | |
} | |
// Response without Null Values, Empty object or array is still present | |
{ | |
"employeeId": 12345, | |
"firstName": "Sunit", | |
"lastName": "Parekh", | |
"addresses": [] | |
} | |
// Response without Null and Empty Values | |
{ | |
"employeeId": 12345, | |
"firstName": "Sunit", | |
"lastName": "Parekh" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment