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
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
...Because JSONDecode returns a table?
This discussion is preserved as it was. New answers, comments, and votes are closed.
6 comments
Okay. So how would I make it show up as regular text instead of JSON
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.
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:
Then you will be able to access your keys by using: print(decode.PLAYER_ID, decode.BAN_REASON) -- etc
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.
It's printing NIL, NIL now