diff options
Diffstat (limited to 'src/BlockTypePalette.cpp')
-rw-r--r-- | src/BlockTypePalette.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/BlockTypePalette.cpp b/src/BlockTypePalette.cpp index b452023c4..7759505cf 100644 --- a/src/BlockTypePalette.cpp +++ b/src/BlockTypePalette.cpp @@ -1,7 +1,7 @@ #include "Globals.h" #include "BlockTypePalette.h" #include "json/value.h" -#include "json/reader.h" +#include "JsonUtils.h" @@ -170,10 +170,8 @@ void BlockTypePalette::loadFromJsonString(const AString & aJsonPalette) { // Parse the string into JSON object: Json::Value root; - Json::CharReaderBuilder builder; - std::unique_ptr<Json::CharReader> reader(builder.newCharReader()); std::string errs; - if (!reader->parse(aJsonPalette.data(), aJsonPalette.data() + aJsonPalette.size(), &root, &errs)) + if (!JsonUtils::ParseString(aJsonPalette, root, &errs)) { throw LoadFailedException(errs); } |