17 lines
370 B
C++
17 lines
370 B
C++
#pragma once
|
|
|
|
// json头文件
|
|
#include "XNCore_global.h"
|
|
#include "XNString.h"
|
|
#include <nlohmann/json.hpp>
|
|
|
|
namespace XNSim {
|
|
// json类型别名
|
|
using XN_JSON = nlohmann::json;
|
|
|
|
FORCEINLINE XN_JSON parseJson(const XN_STRING &jsonStr) {
|
|
return XN_JSON::parse(jsonStr);
|
|
}
|
|
|
|
FORCEINLINE XN_STRING toJson(const XN_JSON &json) { return json.dump(); }
|
|
} // namespace XNSim
|