json-related refactor
This commit is contained in:
@@ -25,10 +25,7 @@ static int l_json_stringify(lua_State* L) {
|
||||
static int l_json_parse(lua_State* L) {
|
||||
auto string = lua_tostring(L, 1);
|
||||
auto element = json::parse("<string>", string);
|
||||
auto value = std::make_unique<dynamic::Value>(
|
||||
dynamic::Map_sptr(element.release())
|
||||
);
|
||||
scripting::state->pushvalue(*value);
|
||||
scripting::state->pushvalue(element);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user