com.google.gson.JsonSyntaxException: This exception has no message.


Samebug tips1

Try this-

SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ssaa");


2 months ago

Solutions on the web1

Solution icon of stackoverflow
This exception has no message.

Stack trace

com.google.gson.JsonSyntaxException
	at com.google.gson.DefaultDateTypeAdapter.deserializeToDate(DefaultDateTypeAdapter.java:107)
	at com.google.gson.DefaultDateTypeAdapter.deserialize(DefaultDateTypeAdapter.java:82)
	at com.google.gson.DefaultDateTypeAdapter.deserialize(DefaultDateTypeAdapter.java:35)
	at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:59)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
	at com.google.gson.Gson.fromJson(Gson.java:755)
	at com.google.gson.Gson.fromJson(Gson.java:721)
	at com.google.gson.Gson.fromJson(Gson.java:670)
	at com.google.gson.Gson.fromJson(Gson.java:642)
	at JSONConverter.main(JSONConverter.java:15)
Caused by: java.text.ParseException: Unparseable date: ""
	at java.text.DateFormat.parse(DateFormat.java:366)
	at com.google.gson.DefaultDateTypeAdapter.deserializeToDate(DefaultDateTypeAdapter.java:105)
	... 10 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago
2 times, 6 months ago
186 times, 3 weeks ago
2 times, 11 months ago
45 more bugmates