JSON parsing iPhone Vs. Android
So I was informed about the url encoding that Android DOES NOT do for xhr. Now I am at a stage where my webservice is returning a result in JSON format. Displays fine in iPhone and I can parse it.
It is of the format:
{Result = ({Distance=5;Price=25.00;Link=www.google.com},{Distance=12;Price=34;Link=www.msn.com});}
This is not parsing at all in the Android env.
Do i need the JSON message to be in a particular format?
I am using JSON.parse.
On Android my result is:
{"Result":"[Ljava.lang.Object;@438c3618"}
Any suggestions?
1 Answer
-
What you have there is not a valid JSON string
To be valid should be something like:
{"Result" : [ {"Distance":"5","Price":"25.00","Link":"www.google.com"},{"Distance":"12","Price":"34","Link","www.msn.com"}] }