samedi 18 avril 2015

Text Parse Exception when Converting Gson response in Android

Hi I have problem with converting json response to my object when change device language!!! actually it is correct when my device set on english language but when i change the device language (for example to persian),i have exception!!! Please help me Excuse me for my bad writing ! Thanks!:)



AsyncTask<String, String, String> p = new PostService(context, url,
object, new ServiceCallback() {

public void onTaskComplete(String response) {

List<ClassName> objectList = gson.fromJson(response,
new TypeToken<List<ClassName>>() {
}.getType());

}

}).execute();


And exception is as follows ,



com.google.gson.JsonSyntaxException: java.text.ParseException: Unparseable date: "Mar 29, 2015" (at offset 0)

Aucun commentaire:

Enregistrer un commentaire