JSONStringify - Quest function in-progress (There has to be a better approach!) #1498
Unanswered
KVonGit
asked this question in
Creating games with Quest
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm stringifying objects (and dictionaries too, once I get objects down pat) to use AJAX to GET and POST the data.
I did not start off with all the backslashes! I kept having to add more for the JSON to be formatted correctly when the script to GET the data is called.
Is there a better way to do this? (I'm thinking there has to be a better way. This is just sloppy!)
With this code, I can
JSONStringify(game.pov)
. POST that, then GET it, then in JSJSON.parse(data)
successfully converts it into an object. (The JS object is not the ultimate goal, I'm just testing it that way right now because I haven't finished writing the function to apply the data and update the object attributes in Quest.)Beta Was this translation helpful? Give feedback.
All reactions