Class NodaJsonSettings
A collection of converters and related settings for
Noda Time JSON parsing. This can be used to configure System.Text.Json
serializers using the ConfigureForNodaTime(JsonSerializerOptions, NodaJsonSettings)
extension method.
Since 3.2.x
Availability net6.0, netstandard2.0
Inherited Members
Namespace: NodaTime.Serialization.SystemTextJson
Assembly: NodaTime.Serialization.SystemTextJson.dll
Syntax
public sealed class NodaJsonSettings
Remarks
This type does not attempt to ensure any sort of thread safety.
The expect use is to create an instance, potentially modify some properties,
use it to configure a JsonSerializerOptions, and then discard it.
Constructors
NodaJsonSettings()
Creates an instance with the default converters, using Tzdb for
time zone conversions.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public NodaJsonSettings()
NodaJsonSettings(IDateTimeZoneProvider)
Creates an instance with the default converters, using the specified IDateTimeZoneProvider
for time zone conversions.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public NodaJsonSettings(IDateTimeZoneProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IDateTimeZoneProvider | provider | The time zone provider to use. Must not be null. |
Properties
AnnualDateConverter
The converter used for AnnualDate values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter AnnualDateConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
DateIntervalConverter
The converter used for DateInterval values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter DateIntervalConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
DateTimeZoneConverter
The converter used for DateTimeZone values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter DateTimeZoneConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
DurationConverter
The converter used for Duration values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter DurationConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
InstantConverter
The converter used for Instant values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter InstantConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
IntervalConverter
The converter used for Interval values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter IntervalConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
LocalDateConverter
The converter used for LocalDate values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter LocalDateConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
LocalDateTimeConverter
The converter used for LocalDateTime values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter LocalDateTimeConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
LocalTimeConverter
The converter used for LocalTime values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter LocalTimeConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
OffsetConverter
The converter used for Offset values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter OffsetConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
OffsetDateConverter
The converter used for OffsetDate values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter OffsetDateConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
OffsetDateTimeConverter
The converter used for OffsetDateTime values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter OffsetDateTimeConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
OffsetTimeConverter
The converter used for OffsetTime values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter OffsetTimeConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
PeriodConverter
The converter used for Period values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter PeriodConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |
ZonedDateTimeConverter
The converter used for ZonedDateTime values.
Since 3.2.x
Availability net6.0, netstandard2.0
Declaration
public JsonConverter ZonedDateTimeConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter |