Use Content-Type: application/json in responses to requests with MaxDataServiceVersion: 2.0

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • V4.0_WD01
    • Affects Version/s: V4.0_WD01
    • Component/s: JSON Format
    • None
    • Hide

      Add the paragraphs:

      Respond with a Content-Type of "application/json" to client requests with a MaxDataServiceVersion of 1.0 or 2.0 and an Accept header listing "application/json" without the suffix ";odata=verbose".
      Respond with a Content-Type of "application/json;odata=verbose" in all other cases.

      Show
      Add the paragraphs: Respond with a Content-Type of "application/json" to client requests with a MaxDataServiceVersion of 1.0 or 2.0 and an Accept header listing "application/json" without the suffix ";odata=verbose". Respond with a Content-Type of "application/json;odata=verbose" in all other cases.

      Section "MIME Type" states that Verbose JSON is represented with a Content-Type of "application/json;odata=verbose" even though in versions 1.0 and 2.0 it used a Content-Type of "application/json".

      Section "Client/Service Format Compatibility and Versions" specifies to respond with Verbose JSON if the client explicitly requests MaxDataServiceVersion: 2.0 and Accept: application/json.

      Responding with Content-Type: application/json;odata=verbose is an avoidable incompatibility that risks breaking pure 2.0 clients.

            Assignee:
            handl
            Reporter:
            handl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: