You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
Proposal
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.
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:
Proposal
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.
Imported from ODATA-1583
The text was updated successfully, but these errors were encountered: