How to serialize Java ZonedDateTime to XML file
问题 Error while serializing ZonedDateTime (it doesn't appear in the output xml at all): java.lang.InstantiationException: java.time.ZonedDateTime Continuing ... java.lang.RuntimeException: failed to evaluate: =Class.new(); Continuing ... I have an instance of the class, where one of the fields is of a type ZonedDateTime. When i'm trying to serialize the object with XMLEncoder: import java.beans.XMLEncoder; I get this errors. In the output file all the other fields appear except the field with