When do you get the parse error, when encoding or decoding? Could you print out the value you’re trying to pass through whichever method is erroring and post it as a response to the thread? Copy it from your output window. If there are any collapsed tables (the right-facing arrow) please expand them first (click on them) before copying them.
You have an invalid structure you’re attempting to pass to either one of these methods but there’s a severe lack of context to identify what the problem is. Saving StringValues is as simple as accessing their Value. In the first place, though, you don’t need to be using JSON when saving to DataStores so if that’s what you’re trying to do then don’t.
This alone doesn’t help, I had more questions than just “what do you get in your output”. Please refer to the post above so you can provide more context here - I also needed to know which side errors.
When do you get the parse error, when encoding or decoding?
Could you print out the value you’re trying to pass through whichever method is erroring and post it as a response to the thread?
Need to know when do you encounter this issue, during encoding or decoding, as well as what this print represents - the value that you’re trying to encode or the value you’re trying to decode.
This is a valid JSON structure that can be decoded:
["Card","Card","Card"]
If you got a table when you printed (and not just a string, like an actual table) then your value is already available to be used right away and there’s no point in trying to JSONDecode it because it’d still give you the parse error. You could sidestep it by checking what typeof returns on the value and only giving it to JSONDecode in a pcall .
Also to reiterate some advice:
So I think it’s best to fix the fundamental error of using JSON to begin with. You don’t need it.