JSON
Functions
Name | |
---|---|
void | addBool(rapidjson::Value & target, const char * key, bool value, rapidjson::Value::AllocatorType & alloc) |
void | addBool(rapidjson::Value & target, const char * key, bool value, Value::AllocatorType & alloc) |
void | addFloat(rapidjson::Value & target, const char * key, float value, rapidjson::Value::AllocatorType & alloc) |
void | addFloat(rapidjson::Value & target, const char * key, float value, Value::AllocatorType & alloc) |
void | addMatrix(rapidjson::Value & target, const char * key, const glm::mat4 & mat, rapidjson::Value::AllocatorType & alloc) |
void | addMatrix(rapidjson::Value & target, const char * key, const glm::mat4 & mat, Value::AllocatorType & alloc) |
void | addRect(rapidjson::Value & target, const char * key, const ImRect & rect, rapidjson::Value::AllocatorType & alloc) |
void | addRect(rapidjson::Value & target, const char * key, const ImRect & rect, Value::AllocatorType & alloc) |
void | addString(rapidjson::Value & target, const char * key, const std::string & value, rapidjson::Value::AllocatorType & alloc) |
void | addString(rapidjson::Value & target, const char * key, const std::string & value, Value::AllocatorType & alloc) |
void | addVector(rapidjson::Value & target, const char * key, const glm::vec3 & vec, rapidjson::Value::AllocatorType & alloc) |
void | addVector(rapidjson::Value & target, const char * key, const glm::vec3 & vec, Value::AllocatorType & alloc) |
void | addVector(rapidjson::Value & target, const char * key, const glm::vec4 & vec, rapidjson::Value::AllocatorType & alloc) |
void | addVector(rapidjson::Value & target, const char * key, const glm::vec4 & vec, Value::AllocatorType & alloc) |
void | addVector(rapidjson::Value & target, const char * key, const ImVec2 & vec, rapidjson::Value::AllocatorType & alloc) |
void | addVector(rapidjson::Value & target, const char * key, const ImVec2 & vec, Value::AllocatorType & alloc) |
Result< Void, Error > | deserializeDocument(const rapidjson::Value & document, rttr::instance obj) |
Result< Void, Error > | deserializeFile(const fs::path & path, rttr::instance obj) |
Result< Void, Error > | deserializeString(const std::string & json, rttr::instance obj) |
std::optional< Core::Data > | getData(const rapidjson::Value & value, Core::EValueType dataType) |
glm::mat4 | getMat(const rapidjson::Value & value) |
ImRect | getRect(const rapidjson::Value & value) |
ImVec2 | getVec2(const rapidjson::Value & value) |
glm::vec3 | getVec3(const rapidjson::Value & value) |
glm::vec4 | getVec4(const rapidjson::Value & value) |
bool | merge(rapidjson::Value & dstObject, rapidjson::Value & srcObject, rapidjson::Document::AllocatorType & allocator)<br>Don't know how to implement this without copying... |
bool | parse(const fs::path & inputPath, rapidjson::Document & doc)<br>Parse json file at inputPath to Document doc. |
bool | parse(const fs::path & inputPath, rapidjson::Document & doc, const fs::path & schemaSrc)<br>Parse json file at inputPath to Document doc. |
bool | parseString(const std::string & jsonStr, rapidjson::Document & doc)<br>Parse json string to Document doc. |
bool | save(const fs::path & path, const rapidjson::Document & document)<br>Write Document into a json file at path. |
Result< Void, Error > | serializeToDocument(rttr::instance obj, rapidjson::Document & doc) |
Result< Void, Error > | serializeToFile(rttr::instance obj, const fs::path & path) |
Result< std::string, Error > | serializeToString(rttr::instance obj) |
Functions Documentation
function addBool
cpp
void addBool(
rapidjson::Value & target,
const char * key,
bool value,
rapidjson::Value::AllocatorType & alloc
)
void addBool(
rapidjson::Value & target,
const char * key,
bool value,
rapidjson::Value::AllocatorType & alloc
)
function addBool
cpp
void addBool(
rapidjson::Value & target,
const char * key,
bool value,
Value::AllocatorType & alloc
)
void addBool(
rapidjson::Value & target,
const char * key,
bool value,
Value::AllocatorType & alloc
)
function addFloat
cpp
void addFloat(
rapidjson::Value & target,
const char * key,
float value,
rapidjson::Value::AllocatorType & alloc
)
void addFloat(
rapidjson::Value & target,
const char * key,
float value,
rapidjson::Value::AllocatorType & alloc
)
function addFloat
cpp
void addFloat(
rapidjson::Value & target,
const char * key,
float value,
Value::AllocatorType & alloc
)
void addFloat(
rapidjson::Value & target,
const char * key,
float value,
Value::AllocatorType & alloc
)
function addMatrix
cpp
void addMatrix(
rapidjson::Value & target,
const char * key,
const glm::mat4 & mat,
rapidjson::Value::AllocatorType & alloc
)
void addMatrix(
rapidjson::Value & target,
const char * key,
const glm::mat4 & mat,
rapidjson::Value::AllocatorType & alloc
)
function addMatrix
cpp
void addMatrix(
rapidjson::Value & target,
const char * key,
const glm::mat4 & mat,
Value::AllocatorType & alloc
)
void addMatrix(
rapidjson::Value & target,
const char * key,
const glm::mat4 & mat,
Value::AllocatorType & alloc
)
function addRect
cpp
void addRect(
rapidjson::Value & target,
const char * key,
const ImRect & rect,
rapidjson::Value::AllocatorType & alloc
)
void addRect(
rapidjson::Value & target,
const char * key,
const ImRect & rect,
rapidjson::Value::AllocatorType & alloc
)
function addRect
cpp
void addRect(
rapidjson::Value & target,
const char * key,
const ImRect & rect,
Value::AllocatorType & alloc
)
void addRect(
rapidjson::Value & target,
const char * key,
const ImRect & rect,
Value::AllocatorType & alloc
)
function addString
cpp
void addString(
rapidjson::Value & target,
const char * key,
const std::string & value,
rapidjson::Value::AllocatorType & alloc
)
void addString(
rapidjson::Value & target,
const char * key,
const std::string & value,
rapidjson::Value::AllocatorType & alloc
)
function addString
cpp
void addString(
rapidjson::Value & target,
const char * key,
const std::string & value,
Value::AllocatorType & alloc
)
void addString(
rapidjson::Value & target,
const char * key,
const std::string & value,
Value::AllocatorType & alloc
)
function addVector
cpp
void addVector(
rapidjson::Value & target,
const char * key,
const glm::vec3 & vec,
rapidjson::Value::AllocatorType & alloc
)
void addVector(
rapidjson::Value & target,
const char * key,
const glm::vec3 & vec,
rapidjson::Value::AllocatorType & alloc
)
function addVector
cpp
void addVector(
rapidjson::Value & target,
const char * key,
const glm::vec3 & vec,
Value::AllocatorType & alloc
)
void addVector(
rapidjson::Value & target,
const char * key,
const glm::vec3 & vec,
Value::AllocatorType & alloc
)
function addVector
cpp
void addVector(
rapidjson::Value & target,
const char * key,
const glm::vec4 & vec,
rapidjson::Value::AllocatorType & alloc
)
void addVector(
rapidjson::Value & target,
const char * key,
const glm::vec4 & vec,
rapidjson::Value::AllocatorType & alloc
)
function addVector
cpp
void addVector(
rapidjson::Value & target,
const char * key,
const glm::vec4 & vec,
Value::AllocatorType & alloc
)
void addVector(
rapidjson::Value & target,
const char * key,
const glm::vec4 & vec,
Value::AllocatorType & alloc
)
function addVector
cpp
void addVector(
rapidjson::Value & target,
const char * key,
const ImVec2 & vec,
rapidjson::Value::AllocatorType & alloc
)
void addVector(
rapidjson::Value & target,
const char * key,
const ImVec2 & vec,
rapidjson::Value::AllocatorType & alloc
)
function addVector
cpp
void addVector(
rapidjson::Value & target,
const char * key,
const ImVec2 & vec,
Value::AllocatorType & alloc
)
void addVector(
rapidjson::Value & target,
const char * key,
const ImVec2 & vec,
Value::AllocatorType & alloc
)
function deserializeDocument
cpp
Result< Void, Error > deserializeDocument(
const rapidjson::Value & document,
rttr::instance obj
)
Result< Void, Error > deserializeDocument(
const rapidjson::Value & document,
rttr::instance obj
)
function deserializeFile
cpp
Result< Void, Error > deserializeFile(
const fs::path & path,
rttr::instance obj
)
Result< Void, Error > deserializeFile(
const fs::path & path,
rttr::instance obj
)
function deserializeString
cpp
Result< Void, Error > deserializeString(
const std::string & json,
rttr::instance obj
)
Result< Void, Error > deserializeString(
const std::string & json,
rttr::instance obj
)
function getData
cpp
std::optional< Core::Data > getData(
const rapidjson::Value & value,
Core::EValueType dataType
)
std::optional< Core::Data > getData(
const rapidjson::Value & value,
Core::EValueType dataType
)
function getMat
cpp
glm::mat4 getMat(
const rapidjson::Value & value
)
glm::mat4 getMat(
const rapidjson::Value & value
)
function getRect
cpp
ImRect getRect(
const rapidjson::Value & value
)
ImRect getRect(
const rapidjson::Value & value
)
function getVec2
cpp
ImVec2 getVec2(
const rapidjson::Value & value
)
ImVec2 getVec2(
const rapidjson::Value & value
)
function getVec3
cpp
glm::vec3 getVec3(
const rapidjson::Value & value
)
glm::vec3 getVec3(
const rapidjson::Value & value
)
function getVec4
cpp
glm::vec4 getVec4(
const rapidjson::Value & value
)
glm::vec4 getVec4(
const rapidjson::Value & value
)
function merge
cpp
bool merge(
rapidjson::Value & dstObject,
rapidjson::Value & srcObject,
rapidjson::Document::AllocatorType & allocator
)
bool merge(
rapidjson::Value & dstObject,
rapidjson::Value & srcObject,
rapidjson::Document::AllocatorType & allocator
)
Don't know how to implement this without copying...
function parse
cpp
bool parse(
const fs::path & inputPath,
rapidjson::Document & doc
)
bool parse(
const fs::path & inputPath,
rapidjson::Document & doc
)
Parse json file at inputPath to Document doc.
Return: True on success, false otherwise.
function parse
cpp
bool parse(
const fs::path & inputPath,
rapidjson::Document & doc,
const fs::path & schemaSrc
)
bool parse(
const fs::path & inputPath,
rapidjson::Document & doc,
const fs::path & schemaSrc
)
Parse json file at inputPath to Document doc.
Return: True on success, false otherwise.
Schema file located at schemaSrc is used to validate the json file.
function parseString
cpp
bool parseString(
const std::string & jsonStr,
rapidjson::Document & doc
)
bool parseString(
const std::string & jsonStr,
rapidjson::Document & doc
)
Parse json string to Document doc.
Return: True on success, false otherwise.
function save
cpp
bool save(
const fs::path & path,
const rapidjson::Document & document
)
bool save(
const fs::path & path,
const rapidjson::Document & document
)
Write Document into a json file at path.
Return: True on success, false otherwise.
function serializeToDocument
cpp
Result< Void, Error > serializeToDocument(
rttr::instance obj,
rapidjson::Document & doc
)
Result< Void, Error > serializeToDocument(
rttr::instance obj,
rapidjson::Document & doc
)
function serializeToFile
cpp
Result< Void, Error > serializeToFile(
rttr::instance obj,
const fs::path & path
)
Result< Void, Error > serializeToFile(
rttr::instance obj,
const fs::path & path
)
function serializeToString
cpp
Result< std::string, Error > serializeToString(
rttr::instance obj
)
Result< std::string, Error > serializeToString(
rttr::instance obj
)
Updated on 2024-11-06 at 20:16:53 +0000