No, NULL and EMPTY fields MUST NOT occur within a JSON payload (note this is NOT dependent on
the multiplicity of the field). In many cases, a NULL/EMPTY value is a data-type violation and would be
declared as such when using JSON Schema Validation.
Instead a lack of data should simply be represented by the data element not appearing in the JSON
payload.
for example representing a course lacking a course code should be done as such:
VALID:
{
“course” : {
“sourcedId”: “<sourcedId of the course>”,
“status” : “active”,
“dateLastModified” : “2012-04-23T18:25:43.511Z”,
“title” : “Organic Chemistry”,
“org” : {
“href”: “<href of the org related to this course>”,
“sourcedId”: “<sourcedId of the org related to this course>”,
“type” : “org”
}
}
}
INVALID
{
“course” : {
“sourcedId”: “<sourcedId of the course>”,
“status” : “active”,
“dateLastModified” : “2012-04-23T18:25:43.511Z”,
“title” : “Organic Chemistry”,
"courseCode" :,
“org” : {
“href”: “<href of the org related to this course>”,
“sourcedId”: “<sourcedId of the org related to this course>”,
“type” : “org”
}
}
}