Pioneer
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
JsonUtils.cpp File Reference
#include "JsonUtils.h"
#include "FileSystem.h"
#include "base64/base64.hpp"
#include "core/GZipFormat.h"
#include "utils.h"
#include <cmath>
#include "miniz/miniz.h"
Include dependency graph for JsonUtils.cpp:

Namespaces

namespace  JsonUtils
 

Macros

#define _USE_MATH_DEFINES
 
#define USE_STRING_VERSIONS
 

Functions

Json JsonUtils::LoadJson (RefCountedPtr< FileSystem::FileData > fd)
 
Json JsonUtils::LoadJsonFile (const std::string &filename, FileSystem::FileSource &source)
 
Json JsonUtils::LoadJsonDataFile (const std::string &filename, bool with_merge)
 
Json JsonUtils::LoadJsonSaveFile (const std::string &filename, FileSystem::FileSource &source)
 
void VectorToJson (Json &jsonObj, const vector2f &vec)
 
void VectorToJson (Json &jsonObj, const vector2d &vec)
 
void VectorToJson (Json &jsonObj, const vector3f &vec)
 
void VectorToJson (Json &jsonObj, const vector3d &vec)
 
void QuaternionToJson (Json &jsonObj, const Quaternionf &quat)
 
void QuaternionToJson (Json &jsonObj, const Quaterniond &quat)
 
void MatrixToJson (Json &jsonObj, const matrix3x3f &mat)
 
void MatrixToJson (Json &jsonObj, const matrix3x3d &mat)
 
void MatrixToJson (Json &jsonObj, const matrix4x4f &mat)
 
void MatrixToJson (Json &jsonObj, const matrix4x4d &mat)
 
void ColorToJson (Json &jsonObj, const Color3ub &col)
 
void ColorToJson (Json &jsonObj, const Color4ub &col)
 
void BinStrToJson (Json &jsonObj, const std::string &binStr)
 
void JsonToVector (vector2f *pVec, const Json &jsonObj)
 
void JsonToVector (vector2d *pVec, const Json &jsonObj)
 
void JsonToVector (vector3f *pVec, const Json &jsonObj)
 
void JsonToVector (vector3d *pVec, const Json &jsonObj)
 
void JsonToQuaternion (Quaternionf *pQuat, const Json &jsonObj)
 
void JsonToQuaternion (Quaterniond *pQuat, const Json &jsonObj)
 
void JsonToMatrix (matrix3x3f *pMat, const Json &jsonObj)
 
void JsonToMatrix (matrix3x3d *pMat, const Json &jsonObj)
 
void JsonToMatrix (matrix4x4f *pMat, const Json &jsonObj)
 
void JsonToMatrix (matrix4x4d *pMat, const Json &jsonObj)
 
void JsonToColor (Color3ub *pCol, const Json &jsonObj)
 
void JsonToColor (Color4ub *pCol, const Json &jsonObj)
 
std::string JsonToBinStr (const Json &jsonObj)
 
void to_json (Json &obj, const fixed &f)
 
void from_json (const Json &obj, fixed &f)
 

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

◆ USE_STRING_VERSIONS

#define USE_STRING_VERSIONS

Function Documentation

◆ BinStrToJson()

void BinStrToJson ( Json jsonObj,
const std::string &  binStr 
)

◆ ColorToJson() [1/2]

void ColorToJson ( Json jsonObj,
const Color3ub col 
)

◆ ColorToJson() [2/2]

void ColorToJson ( Json jsonObj,
const Color4ub col 
)

◆ from_json()

void from_json ( const Json obj,
fixed f 
)
Here is the call graph for this function:

◆ JsonToBinStr()

std::string JsonToBinStr ( const Json jsonObj)

◆ JsonToColor() [1/2]

void JsonToColor ( Color3ub pCol,
const Json jsonObj 
)

◆ JsonToColor() [2/2]

void JsonToColor ( Color4ub pCol,
const Json jsonObj 
)

◆ JsonToMatrix() [1/4]

void JsonToMatrix ( matrix3x3d pMat,
const Json jsonObj 
)
Here is the call graph for this function:

◆ JsonToMatrix() [2/4]

void JsonToMatrix ( matrix3x3f pMat,
const Json jsonObj 
)
Here is the call graph for this function:

◆ JsonToMatrix() [3/4]

void JsonToMatrix ( matrix4x4d pMat,
const Json jsonObj 
)
Here is the call graph for this function:

◆ JsonToMatrix() [4/4]

void JsonToMatrix ( matrix4x4f pMat,
const Json jsonObj 
)
Here is the call graph for this function:

◆ JsonToQuaternion() [1/2]

void JsonToQuaternion ( Quaterniond pQuat,
const Json jsonObj 
)

◆ JsonToQuaternion() [2/2]

void JsonToQuaternion ( Quaternionf pQuat,
const Json jsonObj 
)

◆ JsonToVector() [1/4]

void JsonToVector ( vector2d pVec,
const Json jsonObj 
)

◆ JsonToVector() [2/4]

void JsonToVector ( vector2f pVec,
const Json jsonObj 
)

◆ JsonToVector() [3/4]

void JsonToVector ( vector3d pVec,
const Json jsonObj 
)
Here is the call graph for this function:

◆ JsonToVector() [4/4]

void JsonToVector ( vector3f pVec,
const Json jsonObj 
)
Here is the call graph for this function:

◆ MatrixToJson() [1/4]

void MatrixToJson ( Json jsonObj,
const matrix3x3d mat 
)
Here is the call graph for this function:

◆ MatrixToJson() [2/4]

void MatrixToJson ( Json jsonObj,
const matrix3x3f mat 
)
Here is the call graph for this function:

◆ MatrixToJson() [3/4]

void MatrixToJson ( Json jsonObj,
const matrix4x4d mat 
)
Here is the call graph for this function:

◆ MatrixToJson() [4/4]

void MatrixToJson ( Json jsonObj,
const matrix4x4f mat 
)
Here is the call graph for this function:

◆ QuaternionToJson() [1/2]

void QuaternionToJson ( Json jsonObj,
const Quaterniond quat 
)

◆ QuaternionToJson() [2/2]

void QuaternionToJson ( Json jsonObj,
const Quaternionf quat 
)

◆ to_json()

void to_json ( Json obj,
const fixed f 
)

◆ VectorToJson() [1/4]

void VectorToJson ( Json jsonObj,
const vector2d vec 
)

◆ VectorToJson() [2/4]

void VectorToJson ( Json jsonObj,
const vector2f vec 
)

◆ VectorToJson() [3/4]

void VectorToJson ( Json jsonObj,
const vector3d vec 
)
Here is the call graph for this function:

◆ VectorToJson() [4/4]

void VectorToJson ( Json jsonObj,
const vector3f vec 
)
Here is the call graph for this function: