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 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 07:31 AM.

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

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