Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

When should you use JSONEncode for datastores?

Asked by 4 years ago

So I am having trouble saving a bunch of tables

it basically looks something like this

PlayerData = {
    Poop = {},
    Noob = {},
    AdminsOnTheSite = {},
    AreSoBadTheyShouldBeFired = {},

}


But It wouldn't work so I was wondering when I should JSONEncode since. But I heard roblox automatically JSON Encodes things for you so...... im left with nothing

0
I tend to just use different datastores for stuff likr that. So a seperate ban save, seperate admin saves, and such MrCatDoggo 213 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Normally you should not have to JSONEncode datastores since datastores can store tables, dictionaries, etc. To be perfectly honest, JSONEncode is mostly meant for the HTTPService:PostAsync(). For instance, if you wanted to set up a webhook with discord then you'd need to JSONEncode the table in order for discord to decipher it.

Ad

Answer this question