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

Instance annotations should be prefixed with "@"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CS01
    • Fix Version/s: V4.0_CSD03
    • Component/s: JSON Format
    • Labels:
      None
    • Environment:

      [Applied]

      Description

      Instance annotations in JSON are differentiated from regular properties by the presence of one ore more dots (.) in the name.

      This convention assumes that people won't typically have dots in their property names. However, it's come to my attention that there are cases where people are representing name/value pairs in JSON that have dots in the name.

      Adding the "@" prefix makes it much easier to distinguish annotations, and is consistent with assigning an annotation to a property (basically, prop@ns.annotation clearly means the annotation is applied to a property, while just @ns.annotation means it is applied to the containing object).

      Finally, adding the "@" sets up the opportunity for better alignment with JSON-LD, who also prefixes their "annotations" with "@".

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: