Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-587

Add example for complex value that is an empty object

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.0_CS02
    • Fix Version/s: V4.0_ERRATA01
    • Component/s: JSON Format
    • Labels:
      None
    • Environment:

      [Applied]

      Description

      In some cases a complex value can be an empty object, e.g. if a complex type only contains navigation properties, or only its navigation properties are specified in $select, and the response format is minimal JSON:

      • 7.2: A complex value is represented as a single JSON object containing one name/value pair for each property that makes up the complex type.
      • 8.1: The navigation link for a navigation property is only represented if the client requests odata.metadata=full or the navigation link cannot be computed[...]

      So it clearly is a JSON object with zero name-value pairs (one for each property = zero, one for each non-computable navigation = zero), but it is somewhat hard to deduce this from the specification text. An explicit statement and/or example would help.

      Another example is an open complex type that for this instance doesn't have any properties.

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              handl Ralf Handl
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: