At 8/9/22 01:10 PM, PsychoGoldfish wrote:
At 8/7/22 06:50 PM, 3p0ch wrote:
I'm testing out cloud save support in my Godot implementation for the API and it seems like if the data string has embedded quotes it ends up not working, even if I try to add backslashes in front to escape them. It looks like it works if there are no quotes, but that puts a damper on saving complex data as a JSON encoded string.
I could workaround by having my API implementation replace quotes with some other string of characters that would be unlikely to ever be used by any dev whenever it sends or receives data, but first wanted to check whether strings with embedded quotes are known to work? If they do and I'm just overlooking something (maybe an issue with how my script is handling things before it sends the API request) I'll spend more time trying to fix the underlying problem if possible before resorting to a kludgey workaround.
I'm not sure how you're encoding the JSON in your implementation, but you should be escaping things like quotes and slashes when encoding string data.
So if your "data" value in the cloud save was a JSON string like:
When you encode that in the larger JSON object it would look like:
Someone named planktonfun made a Newgrounds API extension for GDevelop, it should probably added to newgrounds.io.
https://gdevelop.io/game-example/newgrounds-api
https://wiki.gdevelop.io/gdevelop5/extensions/newgrounds-api/reference
@PsychoGoldfish
Someone else named planktonfun made a Newgrounds API extension for GDevelop, it should probably added to newgrounds.io along the other implementation.
https://gdevelop.io/game-example/newgrounds-api
https://wiki.gdevelop.io/gdevelop5/extensions/newgrounds-api/reference