Serialization

Currently serialization is experimental. We will have one serialization assembly for each type of serialization we support which requires separate dependencies; if and when "stock" binary and XML serialization are supported, they will be included within the main Noda Time assembly.

Json.NET: NodaTime.Serialization.JsonNet

Json.NET is supported within the NodaTime.Serialization.JsonNet assembly and the namespace of the same name.

An extension method of ConfigureForNodaTime is provided on both JsonSerializer and JsonSerializerSettings. Alternatively, the NodaConverters type provides public static read-only fields for individual converters. (All converters are immutable.)

Custom converters can be created easily from patterns using NodaPatternConverter.

Supported types and default representations

All default patterns use the invariant culture.

Limitations