Google Directions Json Error

Discussion in 'iOS Programming' started by igorladessa, Dec 19, 2012.

  1. macrumors newbie

    Dec 10, 2012
    I'm trying to get the directions using google directions but I'm getting this error :

    Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character (41)\

    Here is the Json
    loadDirections('Avenida Paulista', 'Rua Augusta', { 'locale': 'en', travelMode: G_TRAVEL_MODE_WALKING, avoidHighways: false, getPolyline: true, getSteps: true, preserveViewport: false})
    Whats is wrong? Whats Unrecognised leading character (41) mean?
  2. Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Doesn't look like you are using valid JSON.

    At first guess, I would suspect your single-quote usage; strings are wrapped in double-quotes. But it could be something else as well.

    Is this JSON you're sending to Google or something you're getting back?
  3. macrumors 68000


    Jun 19, 2007
    White Lake, MI
    I like to use to check if I have valid JSON or not. Just copy and paste your string in there, press validate, and voila

Share This Page