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

Clarify representation of context URLs in JSON payloads

    XMLWordPrintable

    Details

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

      Context URLs for contained entities MUST use parenthesis-style keys.

      Context URL fragments MUST NOT be percent-encoded, not even key values for contained entities.

      Show
      Context URLs for contained entities MUST use parenthesis-style keys. Context URL fragments MUST NOT be percent-encoded, not even key values for contained entities.
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-abnf/pull/106 https://github.com/oasis-tcs/odata-specs/pull/204

      Description

      Context URLs may include characters outside of the unreserved set, e.g. a '(', ')', '/' like for a collection of entities reached via a path to a containment navigation property: "$metadata#set('<key_value>')/cont_nav_prop"

      Some implementations return such a context URL in a JSON payload with percent-encoded '(', ')', '/', e.g. "$metadata#set%28'<key_value>'%29%2Fcont_nav_prop", others return it with plain characters.

      Question is if servers are free to choose the representation of context URLs and service consumers must be prepared to do a percent-decoding before interpreting the context URL

      References:

      • The JSON Format specification in section 4.3 Relative URLs mention colons inside the path part that must be percent-encoded
      • The ABNF includes a statement for the grammar on the necessity of a percent-decoding a URL before parsing it. Shall this rule also be applied for URLs in JSON payloads?

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              gerald.krause1 Gerald Krause
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: