Cool!  But this raises the issue that Struts2 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.  Thoughts?

John


On 3/3/11 5:07 PM, "Dave Newton" <davelnew...@gmail.com> wrote:

A search for the json-rpc type seems to return a lot of hits.

On Thursday, March 3, 2011, John Lindal <lind...@yahoo-inc.com> wrote:
> I just noticed that org.apache.struts2.json.JSONUtil.writeJSONToResponse() 
> sets the Content-type to 'application/json-rpc' for RPC responses.  Is this 
> really correct?  I know browsers understand application/json, but do they 
> understand application/json-rpc?
>
> Unless anybody objects, I would like to switch to application/json, since 
> that is the standard type for JSON data.
>
> John
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org


Reply via email to