Qore JSON Module
1.8
|
Functions | |
string | Qore::makeFormattedJSONRPC11ErrorString (softint code, string error, any id, any error_msg) |
Creates a JSON-RPC 1.1 error response string from the parameters passed, formatted with line breaks for easier readability. More... | |
string | Qore::makeFormattedJSONRPCErrorString (any version, any id, any error_msg) |
Creates a generic JSON-RPC error response string from the parameters passed, formatted with line breaks for easier readability. More... | |
string | Qore::makeFormattedJSONRPCRequestString (string method_name, any version, any id, any request_msg) |
Creates a JSON-RPC request string from the parameters passed, formatted with line breaks for easier readability. More... | |
string | Qore::makeFormattedJSONRPCResponseString (any version, any id, any response_msg) |
Creates a JSON-RPC response string from the parameters passed, formatted with line breaks for easier readability. More... | |
string | Qore::makeJSONRPC11ErrorString (softint code, string error, any id, any error_msg) |
Creates a JSON-RPC 1.1 error response string from the parameters passed, without any line breaks. More... | |
string | Qore::makeJSONRPCErrorString (any version, any id, any error_msg) |
Creates a generic JSON-RPC error response string from the parameters passed, without any line breaks. More... | |
string | Qore::makeJSONRPCRequestString (string method_name, any version, any id, any request_msg) |
Creates a JSON-RPC request string from the parameters passed, without any line breaks. More... | |
string | Qore::makeJSONRPCResponseString (any version, any id, any response_msg) |
Creates a JSON-RPC response string from the parameters passed, without any line breaks. More... | |
string | Qore::make_jsonrpc11_error (softint code, string error, any id, any error_msg, *int format) |
Creates a JSON-RPC 1.1 error response string from the parameters passed, without any line breaks. More... | |
string | Qore::make_jsonrpc_error (any version, any id, any error_msg, *int format) |
Creates a generic JSON-RPC error response string from the parameters passed, without any line breaks. More... | |
string | Qore::make_jsonrpc_request (string method_name, any version, any id, any request_msg, *int format) |
Creates a JSON-RPC request string from the parameters passed, without any line breaks. More... | |
string | Qore::make_jsonrpc_response (any version, any id, any response_msg, *int format) |
Creates a JSON-RPC response string from the parameters passed, without any line breaks. More... | |
string Qore::make_jsonrpc11_error | ( | softint | code, |
string | error, | ||
any | id, | ||
any | error_msg, | ||
*int | format | ||
) |
Creates a JSON-RPC 1.1 error response string from the parameters passed, without any line breaks.
code | the error code to return |
error | a string error message |
id | the ID of the call |
error_msg | the parameters for the error response message/message payload |
format | optional formatting flags; see JSON Generation Constants for more information |
MAKE-JSONRPC11-ERROR-STRING-ERROR | the error code is not between 100-999 or empty error message string |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
string Qore::make_jsonrpc_error | ( | any | version, |
any | id, | ||
any | error_msg, | ||
*int | format | ||
) |
Creates a generic JSON-RPC error response string from the parameters passed, without any line breaks.
version | the JSON-RPC version to include in the call under the "version" key (for JSON-RPC earlier than 2.0) or the "jsonrpc" key (for JSON-RPC equal to or greater than 2.0); will be converted to a string; if the resulting string is empty, the "version" key will not be sent; note that for strict JSON-RPC 1.0 compatibility this argument will not be serialized if passed as "1.0" |
id | the ID of the call |
error_msg | the parameters for the error response message/message payload |
format | optional formatting flags; see JSON Generation Constants for more information |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
version
argument for strict JSON-RPC 1.0 compatibility (send as NOTHING)string Qore::make_jsonrpc_request | ( | string | method_name, |
any | version, | ||
any | id, | ||
any | request_msg, | ||
*int | format | ||
) |
Creates a JSON-RPC request string from the parameters passed, without any line breaks.
To follow JSON-RPC specifications, the generated string will always be in UTF-8 encoding
method_name | the name of the JSON-RPC method to call |
version | the JSON-RPC version to include in the call under the "version" key (for JSON-RPC earlier than 2.0) or the "jsonrpc" key (for JSON-RPC equal to or greater than 2.0); will be converted to a string; if the resulting string is empty, the "version" key will not be sent; note that for strict JSON-RPC 1.0 compatibility this argument will not be serialized if passed as "1.0" |
id | the ID of the call |
request_msg | the parameters for the message/message payload |
format | optional formatting flags; see JSON Generation Constants for more information |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
version
argument for strict JSON-RPC 1.0 compatibility (send as NOTHING)string Qore::make_jsonrpc_response | ( | any | version, |
any | id, | ||
any | response_msg, | ||
*int | format | ||
) |
Creates a JSON-RPC response string from the parameters passed, without any line breaks.
version | the JSON-RPC version to include in the call under the "version" key (for JSON-RPC earlier than 2.0) or the "jsonrpc" key (for JSON-RPC equal to or greater than 2.0); will be converted to a string; if the resulting string is empty, the "version" key will not be sent; note that for strict JSON-RPC 1.0 compatibility this argument will not be serialized if passed as "1.0" |
id | the ID of the call |
response_msg | the parameters for the message/message payload |
format | optional formatting flags; see JSON Generation Constants for more information |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
version
argument for strict JSON-RPC 1.0 compatibility (send as NOTHING)string Qore::makeFormattedJSONRPC11ErrorString | ( | softint | code, |
string | error, | ||
any | id, | ||
any | error_msg | ||
) |
Creates a JSON-RPC 1.1 error response string from the parameters passed, formatted with line breaks for easier readability.
code | the error code to return |
error | a string error message |
id | the ID of the call |
error_msg | the parameters for the error response message/message payload |
MAKE-JSONRPC11-ERROR-STRING-ERROR | the error code is not between 100-999 or empty error message string |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
string Qore::makeFormattedJSONRPCErrorString | ( | any | version, |
any | id, | ||
any | error_msg | ||
) |
Creates a generic JSON-RPC error response string from the parameters passed, formatted with line breaks for easier readability.
version | the JSON-RPC version to include in the call under the "version" key (for JSON-RPC earlier than 2.0) or the "jsonrpc" key (for JSON-RPC equal to or greater than 2.0); will be converted to a string; if the resulting string is empty, the "version" key will not be sent; note that for strict JSON-RPC 1.0 compatibility this argument will not be serialized if passed as "1.0" |
id | the ID of the call |
error_msg | the parameters for the error response message/message payload |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
version
argument for strict JSON-RPC 1.0 compatibility (send as NOTHING)string Qore::makeFormattedJSONRPCRequestString | ( | string | method_name, |
any | version, | ||
any | id, | ||
any | request_msg | ||
) |
Creates a JSON-RPC request string from the parameters passed, formatted with line breaks for easier readability.
To follow JSON-RPC specifications, the generated string will always be in UTF-8 encoding
method_name | the name of the JSON-RPC method to call |
version | the JSON-RPC version to include in the call under the "version" key (for JSON-RPC earlier than 2.0) or the "jsonrpc" key (for JSON-RPC equal to or greater than 2.0); will be converted to a string; if the resulting string is empty, the "version" key will not be sent; note that for strict JSON-RPC 1.0 compatibility this argument will not be serialized if passed as "1.0"s |
id | the ID of the call |
request_msg | the parameters for the message/message payload |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
version
argument for strict JSON-RPC 1.0 compatibility (send as NOTHING)string Qore::makeFormattedJSONRPCResponseString | ( | any | version, |
any | id, | ||
any | response_msg | ||
) |
Creates a JSON-RPC response string from the parameters passed, formatted with line breaks for easier readability.
version | the JSON-RPC version to include in the call under the "version" key (for JSON-RPC earlier than 2.0) or the "jsonrpc" key (for JSON-RPC equal to or greater than 2.0); will be converted to a string; if the resulting string is empty, the "version" key will not be sent; note that for strict JSON-RPC 1.0 compatibility this argument will not be serialized if passed as "1.0" |
id | the ID of the call |
response_msg | the parameters for the message/message payload |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
version
argument for strict JSON-RPC 1.0 compatibility (send as NOTHING)string Qore::makeJSONRPC11ErrorString | ( | softint | code, |
string | error, | ||
any | id, | ||
any | error_msg | ||
) |
Creates a JSON-RPC 1.1 error response string from the parameters passed, without any line breaks.
code | the error code to return |
error | a string error message |
id | the ID of the call |
error_msg | the parameters for the error response message/message payload |
MAKE-JSONRPC11-ERROR-STRING-ERROR | the error code is not between 100-999 or empty error message string |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
string Qore::makeJSONRPCErrorString | ( | any | version, |
any | id, | ||
any | error_msg | ||
) |
Creates a generic JSON-RPC error response string from the parameters passed, without any line breaks.
version | the JSON-RPC version to include in the call under the "version" key (for JSON-RPC earlier than 2.0) or the "jsonrpc" key (for JSON-RPC equal to or greater than 2.0); will be converted to a string; if the resulting string is empty, the "version" key will not be sent; note that for strict JSON-RPC 1.0 compatibility this argument will not be serialized if passed as "1.0" |
id | the ID of the call |
error_msg | the parameters for the error response message/message payload |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
version
argument for strict JSON-RPC 1.0 compatibility (send as NOTHING)string Qore::makeJSONRPCRequestString | ( | string | method_name, |
any | version, | ||
any | id, | ||
any | request_msg | ||
) |
Creates a JSON-RPC request string from the parameters passed, without any line breaks.
To follow JSON-RPC specifications, the generated string will always be in UTF-8 encoding
method_name | the name of the JSON-RPC method to call |
version | the JSON-RPC version to include in the call under the "version" key (for JSON-RPC earlier than 2.0) or the "jsonrpc" key (for JSON-RPC equal to or greater than 2.0); will be converted to a string; if the resulting string is empty, the "version" key will not be sent; for strict JSON-RPC 1.0 compatibility this argument will not be serialized if passed as "1.0" |
id | the ID of the call |
request_msg | the parameters for the message/message payload |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
version
argument for strict JSON-RPC 1.0 compatibility (send as NOTHING)string Qore::makeJSONRPCResponseString | ( | any | version, |
any | id, | ||
any | response_msg | ||
) |
Creates a JSON-RPC response string from the parameters passed, without any line breaks.
version | the JSON-RPC version to include in the call under the "version" key (for JSON-RPC earlier than 2.0) or the "jsonrpc" key (for JSON-RPC equal to or greater than 2.0); will be converted to a string; if the resulting string is empty, the "version" key will not be sent; note that for strict JSON-RPC 1.0 compatibility this argument will not be serialized if passed as "1.0" |
id | the ID of the call |
response_msg | the parameters for the message/message payload |
JSON-SERIALIZATION-ERROR | cannot serialize value passed (ex: binary, object) |
version
argument for strict JSON-RPC 1.0 compatibility (send as NOTHING)