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

When should you use JSONEncode for datastores?

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

1 comment

0

I tend to just use different datastores for stuff likr that. So a seperate ban save, seperate admin saves, and such

1 answer

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.

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