}
// Converts Lua table --> JSON
-void get_json_value(lua_State *L, Json::Value &root, int index)
+void read_json_value(lua_State *L, Json::Value &root, int index)
{
int type = lua_type(L, index);
if (type == LUA_TBOOLEAN) {
while (lua_next(L, index)) {
// Key is at -2 and value is at -1
Json::Value value;
- get_json_value(L, value, lua_gettop(L));
+ read_json_value(L, value, lua_gettop(L));
Json::ValueType roottype = root.type();
int keytype = lua_type(L, -1);
bool push_json_value (lua_State *L,
const Json::Value &value,
int nullindex);
-void get_json_value (lua_State *L,
+void read_json_value (lua_State *L,
Json::Value &root,
int index);
Json::Value root;
try {
- get_json_value(L, root, 1);
+ read_json_value(L, root, 1);
} catch (SerializationError &e) {
lua_pushnil(L);
lua_pushstring(L, e.what());