Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why is JSONDecode showing as tables?

Here's my code.

local connect = game:GetService("HttpService")
local list = connect:GetAsync('DeletedURL')
local decode = connect:JSONDecode(list)
print(decode)

Output: table: 1AE3E948 table: 1B130E18

1 answer

...Because JSONDecode returns a table?

Check out the documentation.

6 comments

0

Okay. So how would I make it show up as regular text instead of JSON

0

Do you understand what JSON is? It's a way to structure your data. If you want the raw JSON, then you do not need to do anything extra to the string that you are getting from the GetAsync method.

0

Okay here's my JSON { PLAYER_ID: "4", BAN_REASON: "Speed hacking", id: 3 }, I want to get the text from Player_ID: and BAN_REASON:

0

Then you will be able to access your keys by using: print(decode.PLAYER_ID, decode.BAN_REASON) -- etc

0

Quick note: JSON is just a "tool" or "syntax" on how we convert tables to strings and back. Because it has a kind of "syntax", other languages can also use this - you can share tables (or lists/arrays) between other languages and programs.

0

It's printing NIL, NIL now

This discussion is preserved as it was. New answers, comments, and votes are closed.