[OPEN SOURCE] Free DataStore Editor Plugin!

Does it support profile service?

Sure! Thanks for the feedback!
(the update is out, now it won’t open automatically)

Profile service uses datastores as well.
If you know the name of the datastores and keys you can work with it.

Yes obviously, as long as you know how profile service works. No DataStore editor currently has specific modes for modules. These modules all use normal datastores, you just have to find out how ProfileService saves data.

For example DS2 keeps every single version it has ever saved, and it has indicators of the versions on OrderedDataStores (this plugin doesn’t have acess to ordered data stores, but still).

I believe profile service just saves stuff normally under the “Profile Store” that you give it.

Do you know how I could use this with DataStore2? I recently changed over and DataStore2 automatically creates a key for the player, aka I don’t know it making this obsolete.

You can DM if you need help with DS2. I made DataStore+ which is based around the idea of DS2 backups. I’m using the same method here (except for having a main version, DS2 doesn’t have that).

I know how DS2 backups work. I can help you modify the data from a player.
The key to a player is basically their userId. But anyways, I can help you out. Just be ware that, because this plugin doesn’t support ordered data stores, you would have to use the command bar to get the “version” indicators for DS2. It’s not that hard.

Also thanks, maker of this plugin, it has helped me a lot with the development of this module and also an upcoming project based on it. :eyes:

Okay thanks! Also can’t what to see what you release next!

1 Like

Idk if i should say that, but thanks for the 3k views!
And the 52 likes!
And for the 414 sales (OMG that’s a lot):

I have a recommendation, for a feature, a cool thing to add would be JSON editing. So, the way I convert data from JSON if i’m not sure if the data is json, is I wrap the JSONDecode() call using a pcall, with no errors no nothing. Then, I check if the data has changed, and do everything. You can keep a marker for JSON encoded data, and then save it as JSON if it was JSON when you did GetAsync on it.

It would help me a lot, especially since I have been having some older data being encoded, and blah blah blah.

Why are you using JSON to save data?
You can save tables into datastores:

local dss = game:GetService('DataStoreService')
local datastore = dss:GetDataStore('TestDS')
local data = {
a = 10,
b = 20,
c = 'hello'

datastore:SetAsync('myData', data)

local loadedData = datastore:GetAsync('myData')
print(loadedData.a) -- 10
print(loadedData.b) -- 20
print(loadedData.c) -- hello

And the plugin can edit this type of tables too.
I don’t see any reason why to use JSON instead of this.

I know datastores support tables. A lot of people use JSON for saving data, maybe compressed data, which needs to be encoded, or just… i mean there’s A LOT of cases where you need to encode your table into a JSON. You know datastores also use JSON to save tables right?

Okay, can you please give some ideas how you imagine this “JSON editing”?
Like, can you make a simple UI, so I can see how it should look like.

Hm what? No no. JSON is basically the structure of tables.

Tables have an index and a value. JSON do the same. Except they do that in a string.

Roblox has options to convert to, and from JSON strings. JSON strings you can think of them as string based tables.

These functions I’m talking about are from HTTPService. Don’t worry they don’t do any requests or yield.

There’s HTTPService:JSONEncode(jsonString) to turn a table into a string, and HTTPService:JSONDecode(table) to turn a table into a string.

One problem with these requests, especifically JSONDecode() is that it will error if it’s not a json string. So putting it inside a pcall is what you should do.
You just ignore any errors that the call has done. Now after doing that, your system should already pick up a table and render that. One cool thing to do would’ve been doing JSONEncode() when saving the data if originally it was a JSON string.

If you don’t know what a JSON/table is, I’ll give you an example

-- Lua Table
local tab = {
     "index" = "value"

While a JSON is this

let tab = {

That still would look weird.

Here’s an example of a lua table: {“Cash” = 0, “Points” = 10}

A JSON string would be something like:

{“Cash”: 0, “Points”:10}

It’s almost the same thing. JSON is just a STRING based table pretty much.

So, if you have a JSON string, it needs to save it in a ‘JSON table’ (idk how to call it), not as a string?

JSON is a STRING-BASED table. A JSON table is a JSON string. You can’t make a JSON “table”, there’s no such thing. Tables in roblox are just the way you interact with JSON. JSON is just a string which works like a table and on Roblox you can convert to a table.

So, the ability to edit JSON strings?

Just support them. Let me show you an example!

This is an example converting a Lua Table into a string.

This is an example converting FROM a JSON string. Which should be what you would be doing most.

JSONEncode() turns a table into a string;
JSONDecode() takes a string and turns it into a table.

There’s no easy way to “edit” json strings. The only thing you would need to do here is handle JSON Strings as tables. Which is not hard. If the data you got from a key is a string, doing a pcall() with a JSONDecode() should convert it.

Okay, now I understand it!
If the key’s value is a JSON string, the plugin will turn it into a table.
You can edit that table, and if you save it, it will save as a JSON string.

1 Like