mirror of
https://github.com/quizhizhe/LiteLoaderBDS-1.16.40.git
synced 2025-06-06 12:03:39 +00:00
16 lines
389 B
C++
16 lines
389 B
C++
//
|
|
// Created by User on 2022/10/29.
|
|
//
|
|
#include "MC/JsonHelpers.hpp"
|
|
|
|
bool JsonHelpers::parseJson(std::string const &str, class Json::Value &value){
|
|
auto jsonRead = new Json::Reader();
|
|
jsonRead->parse(str,value);
|
|
return true;
|
|
};
|
|
|
|
std::string JsonHelpers::serialize(class Json::Value const &value){
|
|
if(value.empty())
|
|
return "";
|
|
return value.toStyledString();
|
|
}; |