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

Instance annotations of absent complex properties

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.01_ERRATA01
    • Component/s: JSON Format
    • Labels:
      None
    • Proposal:
      Hide

      Annotations are always expressed as name/value pairs. For entity data model constructs represented as JSON objects the annotation name/value pairs are placed within the object; for constructs represented as JSON arrays or primitives, including null, they are placed next to the annotated model construct and have the name of the annotated property before the @. An annotation in the latter format can also take the place of an absent property.

      Show
      Annotations are always expressed as name/value pairs. For entity data model constructs represented as JSON objects the annotation name/value pairs are placed within the object; for constructs represented as JSON arrays or primitives, including null,  they are placed next to the annotated model construct and have the name of the annotated property before the @ . An annotation in the latter format can also take the place of an absent property.
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-specs/pull/178

      Description

      According to OData-JSON section 20, a complex property has its instance annotations embedded into the JSON object:

      {
       "ComplexProperty": {
        "@ns.term": ...
        "SubProperty": ...
       }
      }
      

      However, if the property is null, it looks different:

      {
       "ComplexProperty": null,
       "ComplexProperty@ns.term": ...
      }
      

      How shall the instance annotation look if the property is absent? So

      {
       "ComplexProperty@ns.term": ...
      }
      

      or so?

      {
       "ComplexProperty": {
        "@ns.term": ...
       }
      }
      

      Section 20 does not cover the case "When annotating a name/value pair for which the value is absent".

        Attachments

          Activity

            People

            • Assignee:
              heiko.theissen Heiko Theissen
              Reporter:
              heiko.theissen Heiko Theissen
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: