Clarify representation of context URLs in JSON payloads

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

      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?

            Assignee:
            handl
            Reporter:
            gerald.krause1
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: