Issue 641 in google-gson: Failed to invoke public org.joda.time.Chronology() with no args

324 views
Skip to first unread message

googl...@googlecode.com

unread,
Jun 16, 2015, 5:17:44 AM6/16/15
to google-gson...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 641 by ilyammya...@gmail.com: Failed to invoke public
org.joda.time.Chronology() with no args
https://code.google.com/p/google-gson/issues/detail?id=641

I can not write properly objects with joda time classes into json.
Here a piece of code for writing the object to json

------------------------------------------------------------------
Gson gson = new GsonBuilder().serializeNulls().create();
String json = gson .toJson(parseData);
------------------------------------------------------------------

"parseData" is an object that contains not null classes of joda time. Then
json string is sent to the server. After receiving this string from the
server, i get the exception

------------------------------------------------------------------
java.lang.RuntimeException: Failed to invoke public
org.joda.time.Chronology() with no args
------------------------------------------------------------------

in the place:

------------------------------------------------------------------
ParseData parseData = new Gson().fromJson(json, ParseData.class);
------------------------------------------------------------------

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages