OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [OASIS Issue Tracker] Created: (ODATA-532) Clarify whether collections can contain null values

Clarify whether collections can contain null values

                 Key: ODATA-532
                 URL: http://tools.oasis-open.org/issues/browse/ODATA-532
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Bug
          Components: OData ATOM Format , OData CSDL, OData JSON Format, OData Protocol 
    Affects Versions: V4.0_CS01
         Environment: [Proposed]
            Reporter: Michael Pizzo
             Fix For: V4.0_CSD03

OData V3 clearly prohibited collections from containing null values.

In OData V4 we are not as clear. The Atom format specifically prohibits the metadata:null attribute on <element> elements, so we have said you can't have null values in Atom. We don't have the similar restriction in JSON.

There may be scenarios in applying annotations where a collection ends up containing a null value. i.e., 


Could result in a null value within the collection if BillingAddress is null.. 

We do not have a way to say whether or not an instance of a collection could contain null values (i.e., collection(Edm.Int32 nullable=true), nor would I propose we add one unless we think it is important for some clients to support nulls in collections but unreasonable for some services to support.

Option 1: Clarify that an atom/json payload may contain null values, but don't support nulls in collection valued properties until 4.1.
Option 2: Clarify that an atom/json payload may ALWAYS contain null values, include for collection valued properties.

Also, while we're at it, there was some confusion as to whether properties in atom whose value is null but whose underlying type was not string still needed the metadata:type attribute. The answer is yes; no-string primitive properties in Atom always need the metadata:type attribute, even if their value is null. The same rule applies to JSON with full metadata.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]