lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uri Boness (JIRA)" <>
Subject [jira] Commented: (SOLR-1123) Change the JSONResponseWriter content type
Date Wed, 20 May 2009 09:17:45 GMT


Uri Boness commented on SOLR-1123:

Indeed this is just for convenience and should not be in a high priority, but I definitely
see it as a nice to have one. Just to clarify, the suggestion is not to have another request
parameter (that would probably be too much as you mentioned) but instead add a configuration
parameter in solrconfig. So you'll be able to define the json response writer as follows:

<queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter">
    <bool name="useJsonContentType">true</bool>

> Change the JSONResponseWriter content type
> ------------------------------------------
>                 Key: SOLR-1123
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Uri Boness
>             Fix For: 1.5
>         Attachments: JSON_contentType_incl_tests.patch
> 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).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message