lintel 0.2.0
Loading...
Searching...
No Matches
Namespaces | Functions
lintel::json Namespace Reference

Namespaces

namespace  detail
 

Functions

const rapidjson::Value * member (const rapidjson::Value &obj, const char *key)
 
bool getString (const rapidjson::Value &obj, const char *key, std::string &out)
 
bool getBool (const rapidjson::Value &obj, const char *key, bool &out)
 
bool getInt (const rapidjson::Value &obj, const char *key, std::int32_t &out)
 
bool getInt64 (const rapidjson::Value &obj, const char *key, std::int64_t &out)
 
bool getUint64 (const rapidjson::Value &obj, const char *key, std::uint64_t &out)
 
bool getDouble (const rapidjson::Value &obj, const char *key, double &out)
 

Function Documentation

◆ getBool()

bool lintel::json::getBool ( const rapidjson::Value &  obj,
const char *  key,
bool &  out 
)
inline
Returns
true iff the member exists and is a JSON boolean.

◆ getDouble()

bool lintel::json::getDouble ( const rapidjson::Value &  obj,
const char *  key,
double &  out 
)
inline
Returns
true iff the member exists and is a JSON number.

◆ getInt()

bool lintel::json::getInt ( const rapidjson::Value &  obj,
const char *  key,
std::int32_t &  out 
)
inline
Returns
true iff the member exists and is a 32-bit JSON integer.

◆ getInt64()

bool lintel::json::getInt64 ( const rapidjson::Value &  obj,
const char *  key,
std::int64_t &  out 
)
inline
Returns
true iff the member exists and is a JSON integer (any width).

◆ getString()

bool lintel::json::getString ( const rapidjson::Value &  obj,
const char *  key,
std::string &  out 
)
inline
Returns
true iff the member exists and is a JSON string.

◆ getUint64()

bool lintel::json::getUint64 ( const rapidjson::Value &  obj,
const char *  key,
std::uint64_t &  out 
)
inline
Returns
true iff the member exists and is a non-negative JSON integer (any width).

◆ member()

const rapidjson::Value * lintel::json::member ( const rapidjson::Value &  obj,
const char *  key 
)
inline
Returns
the member value, or nullptr if obj is not an object or has no key.