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
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: 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?
__________________
dejo is offline   0 Reply With Quote
Old Dec 21, 2012, 12:36 PM   #3
waterskier2007
macrumors 68000
 
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
16 GB iPhone 5 : 32 GB iPhone 4S : 16 GB iPad 3
16 GB Nexus 7 (2012)
waterskier2007 is online now   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

Similar Threads
thread Thread Starter Forum Replies Last Post
Googled a restaurant and Google Now brings up directions? kat.hayes Alternatives to iOS and iOS Devices 5 Aug 14, 2013 02:06 PM
Google Maps now has biking directions! Bill Av iPhone and iPod touch Apps 3 Jul 18, 2013 11:15 AM
Use Siri to open Google Maps & get directions r2shyyou iOS 6 3 Dec 14, 2012 09:58 AM
What apps to supplement Google maps transit directions? jmcfa001 iOS 6 2 Sep 19, 2012 10:14 AM
Error 400 when using JSON POST method from iOS 5 to WCF service aceswildab1 iPhone/iPad Programming 1 Jun 29, 2012 05:32 PM

Forum Jump

All times are GMT -5. The time now is 07:20 AM.

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

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC