ADTF  3.18.2
cJSONConversions

Utility base class to facilitate JSON conversions. More...

Inheritance diagram for cJSONConversions:
[legend]

Static Public Member Functions

static Json::Value result_to_json (a_util::result::Result nResult)
 Get the Json::Value representation of an object of type a_util::result::Result. More...
 
static std::string to_string (uint64_t nValue)
 Convert an unsigned integer to a string. More...
 
static std::string to_string (int64_t nValue)
 Convert a signed integer to a string. More...
 
static a_util::result::Result json_to_result (const Json::Value &oValue)
 Get the a_util::result::Result representation of an object of type Json::Value. More...
 
static uint64_t stoull (const std::string &strValue)
 Convert a string to an unsigned integer. More...
 
static int64_t stoll (const std::string &strValue)
 Convert a string to a signed integer. More...
 

Detailed Description

Utility base class to facilitate JSON conversions.

Definition at line 28 of file json_rpc.h.

Member Function Documentation

◆ json_to_result()

static a_util::result::Result json_to_result ( const Json::Value oValue)
static

Get the a_util::result::Result representation of an object of type Json::Value.

Parameters
[in]oValueThe json value object to convert
Returns
a_util::result::Result representation

◆ result_to_json()

static Json::Value result_to_json ( a_util::result::Result  nResult)
static

Get the Json::Value representation of an object of type a_util::result::Result.

Parameters
[in]nResultThe result object to convert
Returns
Json::Value representation

◆ stoll()

static int64_t stoll ( const std::string &  strValue)
static

Convert a string to a signed integer.

Parameters
[in]strValueThe value to convert
Returns
Signed integer representation of strValue

◆ stoull()

static uint64_t stoull ( const std::string &  strValue)
static

Convert a string to an unsigned integer.

Parameters
[in]strValueThe value to convert
Returns
Unsigned integer representation of strValue

◆ to_string() [1/2]

static std::string to_string ( int64_t  nValue)
static

Convert a signed integer to a string.

Parameters
[in]nValueThe value to convert
Returns
String representation of nValue

◆ to_string() [2/2]

static std::string to_string ( uint64_t  nValue)
static

Convert an unsigned integer to a string.

Parameters
[in]nValueThe value to convert
Returns
String representation of nValue