You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2011/06/01 12:33:47 UTC

[jira] [Commented] (WW-3635) JSON-RPC should return content-type: application/json

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

Hudson commented on WW-3635:
----------------------------

Integrated in Struts2 #305 (See [https://builds.apache.org/hudson/job/Struts2/305/])
    WW-3635 return application/json instead of application/json-rpc

jafl : 
Files : 
* /struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java
* /struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
* /struts/struts2/trunk/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java


> JSON-RPC should return content-type: application/json
> -----------------------------------------------------
>
>                 Key: WW-3635
>                 URL: https://issues.apache.org/jira/browse/WW-3635
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - JSON
>    Affects Versions: 2.2.3
>            Reporter: John Lindal
>            Assignee: John Lindal
>            Priority: Minor
>             Fix For: 2.3
>
>
> application/json-rpc is a valid return type, but the plugin isn't implementing JSON-RPC 2.0 correctly:
>   http://groups.google.com/group/json-rpc/web/json-rpc-2-0
>   http://groups.google.com/group/json-rpc/web/json-rpc-over-http
> Specifically, the json plugin doesn't return a jsonrpc element with value "2.0" and doesn't use the standard error codes.
> Adding the jsonrpc element is easy, but changing the errors codes will break backward compatibility.
> So it's cleaner to switch the return type to application/json

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira