Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1123

Change the JSONResponseWriter content type

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      Currently the jSON content type is not used. Instead the palin/text content type is used. The reason for this as I understand is to enable viewing the json response as as text in the browser. While this is valid argument, I do believe that there should at least be an option to configure this writer to use the JSON content type. According to RFC4627 the json content type needs to be application/json (and not text/x-json). The reason this can be very helpful is that today you have plugins for browsers (e.g. JSONView) that can render any page with application/json content type in a user friendly manner (just like xml is supported).

        Attachments

        1. JSON_contentType_incl_tests.patch
          3 kB
          Uri Boness
        2. SOLR-1123.patch
          2 kB
          Chris Male
        3. SOLR-1123.patch
          2 kB
          Chris Male

          Issue Links

            Activity

              People

              • Assignee:
                cmale Chris Male
                Reporter:
                uboness Uri Boness
              • Votes:
                13 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: