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

Consider making odata the default namespace for annotations

    XMLWordPrintable

    Details

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

      Simplified Payload;[Propposed]

    • Proposal:
      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)
    • Resolution:
      Show
      https://www.oasis-open.org/apps/org/workgroup/odata/download.php/59030/odata-json-format-v4.01-wd01.docx

      Description

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

        Attachments

          Activity

            People

            • Assignee:
              mikep Michael Pizzo (Inactive)
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: