Cleaned up code in json.lua.