As mentioned, what you pass is automatically encoded to JSON for you, you don’t need to do anything on your end. Encoding it yourself doesn’t allow you to save more – in fact quite the contrary. If you encode it yourself, the data ends up being encoded again, so that means there are more backslashes and double quotes taking up valuable space.
DataStore2 uses normal data stores (literally every data store module does), so anything data stores do in the backend, DataStore2 does as well, since DataStore2 is quite literally a wrapper around Roblox’s data stores.
i mean is it only datastore2 that automatically does json encoding and decoding or does the normal one do it too.
yeah ii know it uses the normal datastore but perhaps there is a function in the module that automatically encodes to json
As I have said, data stores do that automatically for you. When you :SetAsync/:UpdateAsync, the data is already encoded into JSON. When you :GetAsync the data is decoded from JSON.