Instance annotations of absent complex properties

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • V4.01_ERRATA01
    • Affects Version/s: V4.01_OS
    • Component/s: JSON Format
    • None
    • 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.
    • Show
      https://github.com/oasis-tcs/odata-specs/pull/178

      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".

            Assignee:
            heiko.theissen
            Reporter:
            heiko.theissen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: