diff options
Diffstat (limited to 'src/Bindings/LuaJson.cpp')
-rw-r--r-- | src/Bindings/LuaJson.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Bindings/LuaJson.cpp b/src/Bindings/LuaJson.cpp index 4fa16273c..39a720319 100644 --- a/src/Bindings/LuaJson.cpp +++ b/src/Bindings/LuaJson.cpp @@ -160,6 +160,16 @@ static Json::Value JsonSerializeValue(cLuaState & a_LuaState) { switch (lua_type(a_LuaState, -1)) { + case LUA_TBOOLEAN: + { + bool v; + a_LuaState.GetStackValue(-1, v); + return Json::Value(v); + } + case LUA_TNIL: + { + return Json::Value(Json::nullValue); + } case LUA_TNUMBER: { lua_Number v; |