Issues

ZF-8757: Zend_Json_Server_Response should return null for error if there is no error

Description

When there is no error, Zend_Json_Server_Response will not return it, however in the JSON-RPC specification if there is no error it must be returned as null.

http://json-rpc.org/wiki/specification/…

Comments

I set component and auto-reassign.

This appears to be fixed in trunk

While the code in trunk appears fix the JSON-RPC 1.0 spec, it unfortunately seems to break the JSON-RPC 2.0:

bq. Exactly one of result or error MUST be specified. It's not allowed to specify both or none.

http://groups.google.com/group/json-rpc/….

The old code followed the 2.0 spec.

This patch should allow the server to respond correctly to 1.0 and 2.0 specification requests.