diff --git a/t/core/json.t b/t/core/json.t index 6966f914cf6e..a7caf8daedc8 100644 --- a/t/core/json.t +++ b/t/core/json.t @@ -132,12 +132,15 @@ qr/\{"b":\{"a":\{"b":"table: 0x[\w]+"\}\}\}/ local core = require("apisix.core") local data = core.json.decode('{"arr":[]}') ngx.say(core.json.encode(data)) + local data = { arr = setmetatable({}, core.json.array_mt)} + ngx.say(core.json.encode(data)) local data = core.json.decode('{"obj":{}}') ngx.say(core.json.encode(data)) } } --- response_body {"arr":[]} +{"arr":[]} {"obj":{}}