JumblrClient jClient = ...
Post post = jClient.blogPost("gregorymosby", 110521489824L);
Output:
Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected NUMBER but was BOOLEAN
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:795)
at com.google.gson.Gson.fromJson(Gson.java:859)
at com.google.gson.Gson$2.deserialize(Gson.java:131)
at com.tumblr.jumblr.responses.PostDeserializer.deserialize(PostDeserializer.java:22)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)
at com.google.gson.Gson.fromJson(Gson.java:795)
at com.google.gson.Gson.fromJson(Gson.java:859)
at com.tumblr.jumblr.responses.ResponseWrapper.getPosts(ResponseWrapper.java:45)
at com.tumblr.jumblr.JumblrClient.blogPosts(JumblrClient.java:189)
at com.tumblr.jumblr.JumblrClient.blogPost(JumblrClient.java:205)
Checking manually the JSON, I have noticed that there is something wrong with the retrieved JSON of that post:
I have got this exception with this simple code:
Output:
Checking manually the JSON, I have noticed that there is something wrong with the retrieved JSON of that post:
where a 'numeric' (int/long) is expected.