Gooday!
I'm working on a custom data saving system, but am running into a JSON parse error.
Error:
Can't parse JSON
Code:
function SaveData(Token, Data)
local Id = Data[1]
print(Data)
local JSON = HttpService:JSONEncode(
Data
)
local SavedData = HttpService:PostAsync(DataUrl .. "read-server-data", JSON)
return HttpService:JSONDecode(SavedData)
end
I'm trying to pass the table "Data" as JSON to my server. Data prints out as a table.
I've done things like this before (Encoding Tables), but I cant figure it out right now. I don't know if it's just an oversight with syntax or an issue with my table.
Thanks in advance, ThatDevTim
