Emx::EasyJson类 参考

Json相关操作

#include "EasyJson.hpp"

静态 Public 成员函数

static ErrCodeE Load (const char *path, Json::Value &json)
 从文件中加载json数据 更多...
 
static ErrCodeE Parse (const char *data, Json::Value &json)
 解析json数据 更多...
 
static ErrCodeE Parse (const char *data, int size, Json::Value &json)
 解析json数据 更多...
 
static ErrCodeE Parse (const std::string &data, Json::Value &json)
 解析json数据 更多...
 
static ErrCodeE Serialize (const Json::Value &json, std::string &jsonStr)
 序列化json,转换为字符串 更多...
 

成员函数说明

◆ Load()

static ErrCodeE Emx::EasyJson::Load ( const char *  path,
Json::Value &  json 
)
static
参数
path[in] json文件路径
json[out] 存储json数据
返回
ErrCodeE

◆ Parse() [1/3]

static ErrCodeE Emx::EasyJson::Parse ( const char *  data,
Json::Value &  json 
)
static
参数
data[in] json字符串
json[out] 存储json数据
返回
ErrCodeE

◆ Parse() [2/3]

static ErrCodeE Emx::EasyJson::Parse ( const char *  data,
int  size,
Json::Value &  json 
)
static
参数
data[in] json字符串
size[in] json字符串的长度
json[out] 存储json数据
返回
ErrCodeE

◆ Parse() [3/3]

static ErrCodeE Emx::EasyJson::Parse ( const std::string &  data,
Json::Value &  json 
)
static
参数
data[in] json字符串
json[out] 存储json数据
返回
ErrCodeE

◆ Serialize()

static ErrCodeE Emx::EasyJson::Serialize ( const Json::Value &  json,
std::string &  jsonStr 
)
static
参数
json
jsonStr
返回
ErrCodeE