Class that registers capability of serializing
objects with the Jackson core.
ObjectMapper mapper = new ObjectMapper();
types are serialized as numbers (integers or decimals as appropriate) if the
feature is enabled
and otherwise are serialized in standard
ISO-8601 specifies formats for representing offset dates and times, zoned dates and times,
local dates and times, periods, durations, zones, and more. All
have built-in translation to and from ISO-8601 formats.
Granularity of timestamps is controlled through the companion features
DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS. For serialization, timestamps are
written as fractional numbers (decimals), where the number is seconds and the decimal is fractional seconds, if
WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS is enabled (it is by default), with resolution as fine as nanoseconds depending on the
underlying JDK implementation. If
WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS is disabled, timestamps are written as a whole number of
milliseconds. At deserialization time, decimal numbers are always read as fractional second timestamps with up-to-nanosecond resolution,
since the meaning of the decimal is unambiguous. The more ambiguous integer types are read as fractional seconds without a decimal point
READ_DATE_TIMESTAMPS_AS_NANOSECONDS is enabled (it is by default), and otherwise they are read as milliseconds.