diff options
Diffstat (limited to 'src/Bindings/LuaJson.cpp')
-rw-r--r-- | src/Bindings/LuaJson.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Bindings/LuaJson.cpp b/src/Bindings/LuaJson.cpp index ef042d44d..1cd88cf96 100644 --- a/src/Bindings/LuaJson.cpp +++ b/src/Bindings/LuaJson.cpp @@ -9,6 +9,7 @@ #include "LuaState.h" #include "tolua++/include/tolua++.h" #include "json/json.h" +#include "../JsonUtils.h" @@ -295,10 +296,10 @@ static int tolua_cJson_Parse(lua_State * a_LuaState) // Parse the string: Json::Value root; - Json::Reader reader; - if (!reader.parse(input, root, false)) + AString ParseError; + if (!JsonUtils::ParseString(input, root, &ParseError)) { - L.Push(cLuaState::Nil, Printf("Parsing Json failed: %s", reader.getFormattedErrorMessages().c_str())); + L.Push(cLuaState::Nil, Printf("Parsing Json failed: %s", ParseError)); return 2; } |