NodaTime.Serialization.ServiceStackText
3.1.3
ServiceStack.Text JSON serializer support for NodaTime
Install-Package NodaTime.Serialization.ServiceStackText -Version 3.1.3
dotnet add package NodaTime.Serialization.ServiceStackText --version 3.1.3
<PackageReference Include="NodaTime.Serialization.ServiceStackText" Version="3.1.3" />
paket add NodaTime.Serialization.ServiceStackText --version 3.1.3
#r "nuget: NodaTime.Serialization.ServiceStackText, 3.1.3"
NodaTime.Serialization.ServiceStackText
ServiceStack.Text
JSON serialization support for NodaTime v2
. This library will work with v5.0
and later versions of ServiceStack.Text
.
Typical Setup
DateTimeZoneProviders.Tzdb
.CreateDefaultSerializersForNodaTime()
.ConfigureSerializersForNodaTime();
Optional Setup
There are static extension methods to allow for optional fluent configuration.
Use Iso Interval Serializer
DateTimeZoneProviders.Tzdb.CreateDefaultSerializersForNodaTime()
.WithIsoIntervalSerializer()
.ConfigureSerializersForNodaTime();
Use Iso Period Serializer
DateTimeZoneProviders.Tzdb.CreateDefaultSerializersForNodaTime()
.WithNormalizingIsoPeriodSerializer()
.ConfigureSerializersForNodaTime();
One-Off Serializer Setup
//You could create you own serializer by implementing IServiceStackSerializer<T>
NodaSerializerDefinitions.LocalTimeSerializer.ConfigureSerializer();
Alternatively, you can create your own implementation of INodaSerializerSettings
to suit your specific needs.
Default Serializers
The SerivceStack.Text
serializer uses the same default serialization formats as those used in the Json.NET
serializers. You can optionally change the Interval
serializer to use the ISO 8601
Interval spec.
Notes
- Serializer setup should only occur once in your application root.
- Serialization setup should occur before any serialization occurs with
ServiceStack.Text
or there may be undesirable behavior. - If using with ServiceStack, serializer setup should occur before Init of the AppHost.
- For Value types, this will also setup the nullable serializer for that value type.
- Since this is a custom serializer for
ServiceStack.Text
, calls toJsConfig.Reset()
will remove the custom serializers.
Using the Code
- Install the NuGet Package
- NuGet Packages from Latest Successful Build
- You can check out the code and run
build.bat
. It will create NuGet packages you can consume in.\ReleasePackages
or you can directly use the resulting binaries.
Continuous Integration
Special Thanks to JetBrains for hosting this project!
NodaTime.Serialization.ServiceStackText
ServiceStack.Text
JSON serialization support for NodaTime v2
. This library will work with v5.0
and later versions of ServiceStack.Text
.
Typical Setup
DateTimeZoneProviders.Tzdb
.CreateDefaultSerializersForNodaTime()
.ConfigureSerializersForNodaTime();
Optional Setup
There are static extension methods to allow for optional fluent configuration.
Use Iso Interval Serializer
DateTimeZoneProviders.Tzdb.CreateDefaultSerializersForNodaTime()
.WithIsoIntervalSerializer()
.ConfigureSerializersForNodaTime();
Use Iso Period Serializer
DateTimeZoneProviders.Tzdb.CreateDefaultSerializersForNodaTime()
.WithNormalizingIsoPeriodSerializer()
.ConfigureSerializersForNodaTime();
One-Off Serializer Setup
//You could create you own serializer by implementing IServiceStackSerializer<T>
NodaSerializerDefinitions.LocalTimeSerializer.ConfigureSerializer();
Alternatively, you can create your own implementation of INodaSerializerSettings
to suit your specific needs.
Default Serializers
The SerivceStack.Text
serializer uses the same default serialization formats as those used in the Json.NET
serializers. You can optionally change the Interval
serializer to use the ISO 8601
Interval spec.
Notes
- Serializer setup should only occur once in your application root.
- Serialization setup should occur before any serialization occurs with
ServiceStack.Text
or there may be undesirable behavior. - If using with ServiceStack, serializer setup should occur before Init of the AppHost.
- For Value types, this will also setup the nullable serializer for that value type.
- Since this is a custom serializer for
ServiceStack.Text
, calls toJsConfig.Reset()
will remove the custom serializers.
Using the Code
- Install the NuGet Package
- NuGet Packages from Latest Successful Build
- You can check out the code and run
build.bat
. It will create NuGet packages you can consume in.\ReleasePackages
or you can directly use the resulting binaries.
Continuous Integration
Special Thanks to JetBrains for hosting this project!
Release Notes
Added support for AnnualDate.
Remove support for .Net Standard 1.3
Dependencies
-
.NETFramework 4.5
- NodaTime (>= 2.4.0)
- ServiceStack.Text (>= 5.0.0)
-
.NETStandard 2.0
- NodaTime (>= 2.4.0)
- ServiceStack.Text (>= 5.0.0)
Used By
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NodaTime.Serialization.ServiceStackText:
Package | Downloads |
---|---|
EcEnglish.Api.Client
Client library for api.ecenglish.com
|
GitHub repositories
This package is not used by any popular GitHub repositories.
Version History
Version | Downloads | Last updated |
---|---|---|
3.1.3 | 25,425 | 12/5/2019 |
3.0.0.43813 | 59,151 | 5/2/2018 |
2.0.2.38544 | 13,814 | 4/27/2017 |
1.2.18 | 49,287 | 7/13/2015 |
1.2.17 | 6,713 | 6/10/2014 |
1.2.8 | 727 | 3/4/2014 |
1.2.6 | 637 | 2/27/2014 |