summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/CMakeLists.txt2
-rw-r--r--src/Bindings/LuaJson.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt
index 76a912d2b..f5896f02d 100644
--- a/src/Bindings/CMakeLists.txt
+++ b/src/Bindings/CMakeLists.txt
@@ -169,5 +169,5 @@ endif()
if(NOT MSVC)
add_library(Bindings ${SRCS} ${HDRS})
- target_link_libraries(Bindings fmt::fmt lua sqlite tolualib mbedtls HTTPServer)
+ target_link_libraries(Bindings fmt::fmt lua lsqlite tolualib mbedtls HTTPServer SQLiteCpp)
endif()
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;
}