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

Why wont my JSON code work? Im working with HTTP Service.

Im trying to have an array of "doors" inside JSON. Each door needs a "Title" and a "Script" string value. For example this is what i'm tryna do:

Door_One = {"Title" = "Door One", "Script" = "Door One Script"}
Door_Two = {"Title" = "Door Two", "Script" = "Door Two Script}

Im not familiar with how roblox parses JSON code. Im needing JSON code that can do this. Here is the current JSON code I have currently:

{
	"DoorOne": {"Title":"Door One Title","Script","Door One Script"}
}

and this is its server script ( This is for a PLUGIN, this is why i'm using a server script):

local HttpService = game:GetService("HttpService")
local URL = "https://pastebin.com/raw/RgTsmr5N"
local Data = HttpService:GetAsync(URL)
local jsonTable = HttpService:JSONDecode(Data)
print(jsonTable)
print("Complete")

1 answer

✓ Accepted answer
{
    "DoorOne": {"Title":"Door One Title","Script":"Door One Script"}
}

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