Question
When a Data Holder (DH) holds an empty string as the value of an optional field, should the DH return an empty string in the value, or a null value, or a blank value?
For example, for some transactions we store the merchant name or category as an empty string.
Answer
The CDS payload conventions section discusses this issue. See Mandatory/Optional Fields and Empty/Null Fields.
An empty string and a null value are not considered equivalent. See CDS Guide, Data formats - schemas, Fields for which data is unavailable.
In your example, as the merchant fields are optional and it seems the value is not known, then the field should be null
or absent.
Comments
0 comments
Please sign in to leave a comment.