1

Closed

Unknown JSON value: "50.057975193702"

description

An FormatException with this message occurs in:
ComputerBeacon.Json.Parser.FormatJsonProperty(String jsonString)
ComputerBeacon.Json.Parser.Parse(String s)
ComputerBeacon.Json.JsonObject..ctor(String jsonString)
ComputerBeacon.Facebook.ConnectionCaller.GetConnectionObjects[T](String ID, String accessToken, String connection, GraphApiFilter filterOptions)
ComputerBeacon.Facebook.Models.User.GetPhotos(String userID, String accessToken, GraphApiFilter filterOptions)
When calling any of these methods:
User.GetFeed
User.GetPhotos
User.GetPost


Other methods like User.GetFriends or User.GetStatuses works fine.

I am creating Windows Forms application in Visual Basic .NET 10.0 (.NET Framework 4.0) using portable libraries.
Closed Jul 20, 2013 at 2:15 PM by kayson

comments

kayson wrote Jun 22, 2013 at 4:46 AM

This issue is because for now the library is using the culture of the running computer instead of invariant culture to parse the JSON. In some cultures (e.g. fr), Double.Parse is expecting a "," instead of a "." in the number, thus it fails to parse the number.

This issue will be fixed in the next release of JSON Toolkit (which is already completed at this time); for now you can try setting the current thread culture to invariant, or modifying Double.Parse in the FormatJsonProperty method in JSON Toolkit and recompile.

wrote Jul 20, 2013 at 2:15 PM