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

Data Stores JSON Encoded?

Asked by 9 years ago

First, Can i save JSON encoded data into a datastore, and Second, if so, how much data would it take up in the datastore of the one async?

ds:SetAsync("String",str) --str is more than 65k characters (won't save because of data limits)
ds:SetAsync("JSON",bigjsoncode) --if you can save, how much data would it take up in the async of ds?

1 answer

Log in to vote
2
Answered by
Wizzy011 245 Moderation Voter
9 years ago

Encoded JSON data would be saved into the database just as a string, as that effectively is what JSON is. It's just a string which has been formatted in a certain way to be easily transferred. Saving your string as a JSON wouldn't lower your count at all, in fact I'd be likely to increase it if anything! Each space for instance would take up 3 characters as "%20" rather than just a space key. Technically, the database will already transfer your data to a JSON format anyway, so this whole explanation is useless!

0
ok thanks, so I shouldn't bother switching my tables to json strings in datastores? FutureWebsiteOwner 270 — 9y
0
There's absolutely no point! It does it automatically for you :P Wizzy011 245 — 9y
Ad

Answer this question