handle_jsonrpc_request()
handle_jsonrpc_request(Mixed $request, Array $opts = array()) : Mixed
Process a JSON-RPC request.
Parameters
| Mixed | $request | Either the JSON text, Array or object. |
| Array | $opts | Optional settings. |
Returns
Mixed —The response, see below for the possible formats.
Options:
'v1errors' If true, we use the ServerError structure even on JSON-RPC 1.0 requests. Otherwise version 1.0 will use the error message as a string.
'v1named' If true, we allow named parameters in version 1.0 requests. This is technically against the spec, but plenty of implementations use it, so we support it.
'asobject' If true, we return the ServerResponse object. If false, we return a JSON string.
'debug' If true, we enable some debugging code.
'inbatch' DO NOT USE, this is used internally to indicate we are in a batch operation.