-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
What steps will reproduce the problem?
1. foursquareApi.setVersion("20140501");
1. foursquareApi.venuesSearch(searchParams);
where searhParams is an HashMap<String,String> defined as follows:
searchParams.put("intent", "browse");
searchParams.put("ne", ne);
searchParams.put("sw", sw);
ne = pair of "lat,lng" coordinates
sw = pair of "lat,lng" coordinates
What is the expected output? What do you see instead?
Expected output: a Result<VenuesSearchResult> object
I receive instead an exception
What version of the product are you using? On what operating system?
I'm using foursquare-api-1.0.2.jar on Windows 7 x64
Please provide any additional information below.
When I call the method venuesSearch() I get the exception
fi.foyt.foursquare.api.FoursquareApiException: org.json.JSONException:
JSONObject["specials"] is not a JSONArray.
I have this exception only when I use setVersion("APIversion") method with any
APIversion value after year 2012. Since now Foursquare requires mandatory to
upgrade the api version, I need to do this.
Here the entire exception stack trace:
at fi.foyt.foursquare.api.JSONFieldParser.parseEntity(JSONFieldParser.java:140)
at fi.foyt.foursquare.api.JSONFieldParser.parseEntities(JSONFieldParser.java:57)
at fi.foyt.foursquare.api.FoursquareApi.handleVenueSearchResult(FoursquareApi.java:963)
at fi.foyt.foursquare.api.FoursquareApi.venuesSearch(FoursquareApi.java:1011)
at it.unito.geosummly.FoursquareSearchVenues.searchVenues(MyClass.java:55)
where MyClass.java is the class which call the method.
Original issue reported on code.google.com by gia.falc...@gmail.com on 3 May 2014 at 3:16
Reactions are currently unavailable