lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Tucker (Commented) (JIRA)" <>
Subject [jira] [Commented] (SOLR-1123) Change the JSONResponseWriter content type
Date Sun, 02 Oct 2011 07:12:34 GMT


Chris Tucker commented on SOLR-1123:

Is there really such a large use case for users who don't have a JSON plugin installed but
do need to view JSON results in the browser?  An XML response will almost certainly be rendered
more readably for those users (in which case the JSON point is moot), and if the user does
intend to view JSON frequently they simply install a JSON plugin: reading JSON as a big lump
of text without the aid of a plugin is not a manageable solution for most people I know. 
Intentionally returning a known-wrong content type to work around a client issue for casual
users while causing a much bigger problem (thwarting well-behaved clients, JSON plugins, and
filters) for users who actually need to work with this seems like a poor choice.  I'd argue
the default should be changed to application/json immediately, and a separate (lower-priority)
ticket raised to address allowing the user to override the content-type in the response if
they so desire.
> Change the JSONResponseWriter content type
> ------------------------------------------
>                 Key: SOLR-1123
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Uri Boness
>             Fix For: 3.5, 4.0
>         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.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message