Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 19, 2012, 10:43 AM   #1
igorladessa
macrumors newbie
 
Join Date: Dec 2012
Google Directions Json Error

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
Code:
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?
igorladessa is offline   0 Reply With Quote
Old Dec 19, 2012, 11:51 AM   #2
dejo
Demi-God (Moderator)
 
dejo's Avatar
 
Join Date: Sep 2004
Location: Colorado
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?
__________________
My iOS Apps: a.k.a., DreamStream
I support the MacRumors Blood Drive!
dejo is offline   0 Reply With Quote
Old Dec 21, 2012, 12:36 PM   #3
waterskier2007
macrumors 65816
 
waterskier2007's Avatar
 
Join Date: Jun 2007
Location: White Lake, MI
Send a message via AIM to waterskier2007
Quote:
Originally Posted by dejo View Post
Doesn't look like you are using valid JSON.
I like to use http://jsonlint.com/ to check if I have valid JSON or not. Just copy and paste your string in there, press validate, and voila
__________________
2012 Mac Mini, 2.6 GHz, 16GB RAM, 1TB HDD
2.4Ghz 15" Macbook Pro
32 GB iPhone 4S : 16 GB iPod nano : 16 GB iPad 3
Nikon D60 : 18-55 mm VR : 55-200 mm VR
waterskier2007 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:17 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC