That's definitely not what I want. I can just use JSON, but this is now something I'm wondering if is possible.
javascript
json
query-string
Share
Improve this question
asked Oct 10, 2012 at 22:20
JesseJesse10.5k1010 gold badges6464 silver badges8181 bronze badges2
2did you try to use JSON.stringify ?
– Prog Mania
CommentedOct 10, 2012 at 22:23
I've already implemented this in my code using JSON - this is just a curiosity about what can be passed via GET queries.
– Jesse
CommentedOct 11, 2012 at 2:09
Add a ment
|
1 Answer
1
Reset to default
11
If you want to pass that data structure using PHP's URI format (which is what your attempt looks like), it would look something like:
You are probably better off just passing the JSON itself though. Take the JavaScript object and run it through JSON.stringify() and encodeURIComponent() to get: