forked from qt-creator/qt-creator
Lua: Add to/from json convenience functions
Change-Id: Ibf69c8021d676bd6efbbdb5331f1925808fcfe38 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -288,14 +288,8 @@ void addFetchModule()
|
||||
callback(error.errorString());
|
||||
return;
|
||||
}
|
||||
if (doc.isObject()) {
|
||||
callback(LuaEngine::toTable(thisState, doc.object()));
|
||||
} else if (doc.isArray()) {
|
||||
callback(LuaEngine::toTable(thisState, doc.array()));
|
||||
} else {
|
||||
sol::state_view lua(thisState);
|
||||
callback(lua.create_table());
|
||||
}
|
||||
|
||||
callback(LuaEngine::toTable(thisState, doc));
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user