0

There is syntax error in this response(google api response),I want to get Points' data from this response. how can i get it.

{
    tooltipHtml:" (9.6 km / 18 mins)",
    polylines:[
    {
    id:"route0",
    points:"_y}oBwxiaM{CdCaAh@}IvAgAB_BOqLgBgCXqFhB_GdCoAnAcGlHuAjA_Bb@oBAy@MsVqI{DgBgC{AmE{EqA{Be@oCLcDvDaRPeDGiBY_Bi@mAyAiB{@g@aC_AyT{FyCcBqMoIqQ{I??URSCIMJ]UuASuGN}THiCd@_GWyGiB}GmCyPwAwLqCqq@}CqMsBkMGiFMOWwDIwDg@mC]}@??k@s@oBD??yDvAqPpKeEfBcJdGoD~@sBAqAYcBm@mBY??`@g@l@[??RyAQoA",
    levels:"B??@???@?@??@??A?@??@???@???@??@??BB?????????@???????????BB?BB???@????BB?BB?B",
    numLevels:4,
    zoomFactor:16
    }
    ]
    }

http://maps.google.com/maps?output=dragdir&saddr=18.507853,73.783338&daddr=18.545277,73.803988 is api what i am using.

Nitesh
  • 1,924
  • 21
  • 31

1 Answers1

0

Use this NSJSONSerialization if you want the json data

+ (NSData *)dataWithJSONObject:(id)obj options:(NSJSONWritingOptions)opt 
error:(NSError **)error
Hussain Shabbir
  • 14,801
  • 5
  • 40
  • 56
  • problem is, i am not getting valid json format in response. is there general way to make invalid json (like this) make valid json ? – Nitesh Oct 31 '13 at 07:08