the XMLGregorianCalendar datatype is not supported by gson API
See original GitHub issueWhat steps will reproduce the problem?
1. If a POJO has a variable of the XMLGregorianCalendar datatype, the result is
null.
2.
3.
What is the expected output? What do you see instead?
It should be Date.
What version of the product are you using? On what operating system?
gSon 1.2.3 and Windows 7
Please provide any additional information below.
I have application from which XML can be converted to json and vice versa. The
following variable in my POJO with the datatype of XMLGregorianCalendar for
date is null in my output.
protected XMLGregorianCalendar doj;
Please help me ASAP.
Regards,
Harish
Original issue reported on code.google.com by swarab...@gmail.com
on 10 Oct 2011 at 8:01
Issue Analytics
- State:
- Created 9 years ago
- Comments:6
Top Results From Across the Web
the XMLGregorianCalendar datatype is not supported by gson ...
Issue 368 in google-gson: the XMLGregorianCalendar datatype is not supported by gson API. 587 views. Skip to first unread message.
Read more >How to de-serialize XMLGregorianCalender with Gson?
Abstract class javax.xml.datatype.XMLGregorianCalendar can not be a instantiated by its default/no-args constructor which makes GSON to fail ...
Read more >XMLGregorianCalendarAdapter (Prowide Core API Reference)
Method Summary ; javax.xml.datatype.XMLGregorianCalendar, deserialize(com.google.gson.JsonElement jsonElement, java.lang.reflect.Type type, com.google.gson.
Read more >XMLGregorianCalendar is changing the format while using ...
The reason why Gson outputs the XMLGregorianCalendar as JSON object is because it does not have a built-in adapter for this type and...
Read more >java.lang.RuntimeException: Failed to invoke public javax.xml ...
RuntimeException: Failed to invoke public javax.xml.datatype.XMLGregorianCalendar() with no args. g = (MessageType) gson.fromJson(s, MessageType. class );.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With gson v2.5 and java 8
and the registration
Original comment by
eric.b.f...@gmail.com
on 18 Oct 2013 at 2:59