I want to create a dictionary containing array and send it to GAE using jquery’s ajax request.
something like- {'a':'text', 'b':'othertext','c':['texta','textb']} which I’m creating manually.
I am able to receive and process a and b using self.request.get on GAE but not the c.
Is there any other way to create JSON object in js? Please suggest whats wrong in this method.
Presumably, GAE’s
self.request.getis not able to serialize a complex object like a string array into a GET request format (?a=text&b=othertext...).One workaround, although perhaps not a very neat one, would be to serialize the value to JSON yourself, and pass that:
… and then of course you’d have to deserialize
cJSONat the receiving end.