$darkmode
Qore json Module 1.9.0
Qore::Json Namespace Reference

Json namespace. More...

Classes

class  JsonRpcClient
 The JsonRpcClient class provides easy access to JSON-RPC web services. More...
 

Functions

string makeFormattedJSONString (auto data, *string encoding)
 Serializes qore data into a JSON string, formatted with line breaks for easier readability. More...
 
string makeJSONString (auto data, *string encoding)
 Serializes qore data into a JSON string, without any line breaks. More...
 
string make_json (auto data, *int format, *string encoding)
 Serializes qore data into a JSON string with optional whitespace formatting (line breaks and indentation) More...
 
nothing parseJSON ()
 This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters. More...
 
auto parseJSON (string json_str)
 Parses a JSON string and returns the corresponding Qore data structure. More...
 
auto parse_json (string json_str)
 Parses a JSON string and returns the corresponding Qore data structure. More...
 
string makeFormattedJSONRPC11ErrorString (softint code, string error, auto id, auto error_msg)
 Creates a JSON-RPC 1.1 error response string from the parameters passed, formatted with line breaks for easier readability. More...
 
string makeFormattedJSONRPCErrorString (auto version, auto id, auto error_msg)
 Creates a generic JSON-RPC error response string from the parameters passed, formatted with line breaks for easier readability. More...
 
string makeFormattedJSONRPCRequestString (string method_name, auto version, auto id, auto request_msg)
 Creates a JSON-RPC request string from the parameters passed, formatted with line breaks for easier readability. More...
 
string makeFormattedJSONRPCResponseString (auto version, auto id, auto response_msg)
 Creates a JSON-RPC response string from the parameters passed, formatted with line breaks for easier readability. More...
 
string makeJSONRPC11ErrorString (softint code, string error, auto id, auto error_msg)
 Creates a JSON-RPC 1.1 error response string from the parameters passed, without any line breaks. More...
 
string makeJSONRPCErrorString (auto version, auto id, auto error_msg)
 Creates a generic JSON-RPC error response string from the parameters passed, without any line breaks. More...
 
string makeJSONRPCRequestString (string method_name, auto version, auto id, auto request_msg)
 Creates a JSON-RPC request string from the parameters passed, without any line breaks. More...
 
string makeJSONRPCResponseString (auto version, auto id, auto response_msg)
 Creates a JSON-RPC response string from the parameters passed, without any line breaks. More...
 
string make_jsonrpc11_error (softint code, string error, auto id, auto error_msg, *int format)
 Creates a JSON-RPC 1.1 error response string from the parameters passed, without any line breaks. More...
 
string make_jsonrpc_error (auto version, auto id, auto error_msg, *int format)
 Creates a generic JSON-RPC error response string from the parameters passed, without any line breaks. More...
 
string make_jsonrpc_request (string method_name, auto version, auto id, auto request_msg, *int format)
 Creates a JSON-RPC request string from the parameters passed, without any line breaks. More...
 
string make_jsonrpc_response (auto version, auto id, auto response_msg, *int format)
 Creates a JSON-RPC response string from the parameters passed, without any line breaks. More...
 

Variables

const JGF_ADD_FORMATTING = JGF_ADD_FORMATTING
 use whitespace formatting including line breaks and indentation to make generated JSON more readable by humans
 
const JGF_NONE = JGF_NONE
 no flags; standard JSON generation without whitespace formatting
 

Detailed Description

Json namespace.