lucene-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/SOLR-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119092#comment-13119092
] 

Chris Tucker commented on SOLR-1123:
------------------------------------

JSON is certainly popular, and I agree that many users have a visceral reaction against XML.
 However, we're talking here about maintaining current behavior to support one very specific
set of users: those who (1) are not committed enough to JSON to know how to view it (a plugin,
Firebug, or what have you, which they will need for *every other case* where they get JSON
from any other service out there) but (2) are committed enough to it to not be able/willing
to use the (arguably much better) XML visualization tools built into every browser.  This
just seems like a very small population of users.  Meanwhile, the current behavior thwarts
many serious users who *do* want to use a JSON plugin, makes it impossible to write content-type
aware servlet filters (which was my use case way back when), and violates the expectation
that a response will have the RFC defined content type associated with it.  IMHO the cost
vastly outweighs the benefit here: if need be, put a note on the wiki in the tutorial where
JSON is mentioned (which, as far as I can tell, is simply to say "hey, you can get the results
in JSON, too!") pointing people to a browser plugin and be done with it.
                
> Change the JSONResponseWriter content type
> ------------------------------------------
>
>                 Key: SOLR-1123
>                 URL: https://issues.apache.org/jira/browse/SOLR-1123
>             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|http://www.ietf.org/rfc/rfc4627.txt]
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|http://brh.numbera.com/software/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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message