Reproduction Steps
To reproduce the issue, a trimmed version of the example code on the webpage can be used. Execute this in the command bar:
local tbl = {
Key = "Key"
}
tbl.Cycle = tbl
print(game:GetService("HttpService"):JSONEncode(tbl))
Expected Behavior
According to the documentation, the output should define the JSON such that "Cycle" : "*** certain entries belong to the same table ***"
is included in the output string.
Actual Behavior
Instead of the documented behavior occurring, JSONEncode
will instead raise an exception, preventing the JSON from being generated if it has a cyclic table within it.
Issue Area: DevHub Website
Page URL: HttpService | Roblox Creator Documentation
Impact: Low
Frequency: Constantly