|
mjsonrpc 1.0
A lightweight JSON-RPC 2.0 message parser and generator based on cJSON
|
Functions for processing JSON-RPC requests. More...
Functions | |
| char * | mjrpc_process_str (mjrpc_handle_t *handle, const char *request_str, int *ret_code) |
| Process a JSON-RPC request string. | |
| cJSON * | mjrpc_process_cjson (mjrpc_handle_t *handle, const cJSON *request_cjson, int *ret_code) |
| Process a JSON-RPC request cJSON object. | |
Functions for processing JSON-RPC requests.
| cJSON * mjrpc_process_cjson | ( | mjrpc_handle_t * | handle, |
| const cJSON * | request_cjson, | ||
| int * | ret_code | ||
| ) |
Process a JSON-RPC request cJSON object.
Processes a JSON-RPC request cJSON object, calling the appropriate registered method and returning the response as a cJSON object.
| handle | JSON-RPC handle containing registered methods |
| request_cjson | JSON-RPC request cJSON object |
| ret_code | Pointer to store the return code (can be NULL) |
| NULL | If the request was a notification or an error occurred |
| char * mjrpc_process_str | ( | mjrpc_handle_t * | handle, |
| const char * | request_str, | ||
| int * | ret_code | ||
| ) |
Process a JSON-RPC request string.
Parses and processes a JSON-RPC request string, calling the appropriate registered method and returning the response as a string.
| handle | JSON-RPC handle containing registered methods |
| request_str | JSON-RPC request string (must be valid JSON) |
| ret_code | Pointer to store the return code (can be NULL) |
| NULL | If the request was a notification or an error occurred |