Consider making odata the default namespace for annotations

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • V4.01_WD01
    • Affects Version/s: V4.0_OS
    • Component/s: JSON Format
    • Environment:

      Simplified Payload;[Propposed]

    • Hide

      If the client does not specify odata.maxversion = 4.0, the service may omit the "odata." namespace for annotations. Clients interpret properties starting with "@" that don't contain a dot as being within the odata namespace.

      i.e., "@type", "@id", "@editLink", "@nextLink", etc.

      Clients must still be prepared to receive results with the "odata." prefix and must only omit the prefix in request bodies to services supporting OData 4.01 or greater (generally, it should be safe to format a request body the same way it was retrieved in a response)

      Show
      If the client does not specify odata.maxversion = 4.0, the service may omit the "odata." namespace for annotations. Clients interpret properties starting with "@" that don't contain a dot as being within the odata namespace. i.e., "@type", "@id", "@editLink", "@nextLink", etc. Clients must still be prepared to receive results with the "odata." prefix and must only omit the prefix in request bodies to services supporting OData 4.01 or greater (generally, it should be safe to format a request body the same way it was retrieved in a response)
    • Show
      https://www.oasis-open.org/apps/org/workgroup/odata/download.php/59030/odata-json-format-v4.01-wd01.docx

      OData control information is represented in a JSON payload using annotations in the odata namespace, such as:
      "@odata.nextlink":"http://..."
      For services that want the payload to look as much as possible like handcrafted json, the fact that "odata" is explicitly called out in the payload is a distraction.

      We might make it easier for services to ease into OData's JSON format by making odata the default namespace, such that the same annotation could be written equivalently as:
      "@nextlink":"http://..."

            Assignee:
            Michael Pizzo (Inactive)
            Reporter:
            Michael Pizzo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: