Announcement Announcement Module
Collapse
No announcement yet.
[spring-social-foursquare]Error when search Tip's "Could not read JSON:Invalid UTF-8" Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [spring-social-foursquare]Error when search Tip's "Could not read JSON:Invalid UTF-8"

    Hello there.

    I think I'm having an strange behavior with the spring-social-foursquare, when I do this search (with Linux, linux, LINUX, linuX is the same):

    Code:
    List tips = foursquare.tipOperations().search( 19.25, -99.7, "Linux", 0, false );
    I get the following message:

    org.springframework.http.converter.HttpMessageNotR eadableException: Could not read JSON: Invalid UTF-8 start byte 0x91
    at [Source: java.io.ByteArrayInputStream@945e31; line: 1, column: 5129]; nested exception is org.codehaus.jackson.JsonParseException: Invalid UTF-8 start byte 0x91
    at [Source: java.io.ByteArrayInputStream@945e31; line: 1, column: 5129]
    ...


    But if I do
    Code:
    List tips = foursquare.tipOperations().search( 19.25, -99.7, "Yahoo!", 0, false );
    or
    Code:
    List tips = foursquare.tipOperations().search( 19.25, -99.7, "Starbucks", 0, false );
    It works ok.

    Any ideas about why am i getting this response?

    thanks in advance
    Last edited by luisfmp; Oct 17th, 2012, 10:39 AM. Reason: type error

  • #2
    Without looking into the details for it, I'm guessing that there is some character among the returned data that is not UTF-8 and is tripping up the JSON parsing which is assuming UTF-8. I'm not sure, but *maybe* the Foursquare API isn't expected to return UTF-8 and thus the API binding should not expect it either. Again, just guesses without looking into the details further.

    Spring Social Foursquare is a community extension and not one of the modules that I directly support. But I'll ping the author and see if he has any ideas. If I get a free moment or two, I might dig into it a bit more, too. I advise that if you've not done so already, you should write up a bug issue at the project's GitHub page (https://github.com/mattupstate/sprin...rsquare/issues).

    Comment

    Working...
    X