I am curious why, when I JSONDecode this API request, it returns a table, but when I print the table, the output is 0x2eab12f562b0d87e. The only way to get the values is if I do not decode the response, but then it is just a string and useless.
local url = "https://x-colors.herokuapp.com/api/random"
local http = game:GetService("HttpService")
local color = game.ReplicatedStorage.ReturnColor
local function getColor()
local response = http:GetAsync(url)
local data = http:JSONDecode(response)
return response
end
After much testing, I believe that this API request is not working with lua, but I am unsure; does anyone have any knowledege they would be able to share linked to this?
The string you’re getting in the output is the memory address of the table. You’re getting this string because the Log Mode setting in the output is on. You can disable it by clicking options (…) in the top-right of the output widget.
Log Mode is used to simplify the output by removing options such as expandable trees.