Skip to content

Repository files navigation

Pure.Primitives.Abstractions.Serialization.System

System.Text.Json converters for Pure.Primitives abstract types — serialize and deserialize IBool, IChar, IString, INumber<T>, IGuid, IDate, ITime, IDateTime, and IDayOfWeek.

.NET build & testBuild and DeployNuGetLicense: MIT

Overview

Pure.Primitives.Abstractions.Serialization.System provides a JsonConverter<T> for every interface defined in Pure.Primitives.Abstractions. Because the domain model exposes only interfaces, System.Text.Json cannot resolve concrete implementations at deserialization time — these converters handle that mapping explicitly, reading and writing via the concrete types from Pure.Primitives.

Converters

ConverterInterfaceJSON representation
BoolConverterIBoolJSON boolean
CharConverterICharSingle-character JSON string
StringConverterIStringJSON string
IntConverterINumber<int>JSON number
LongConverterINumber<long>JSON number
ShortConverterINumber<short>JSON number
UIntConverterINumber<uint>JSON number
ULongConverterINumber<ulong>JSON number
UShortConverterINumber<ushort>JSON number
FloatConverterINumber<float>JSON number
DoubleConverterINumber<double>JSON number
DecimalConverterINumber<decimal>JSON number
GuidConverterIGuidJSON string (UUID format)
DateConverterIDateJSON string (date format)
TimeConverterITimeJSON string (time format)
DateTimeConverterIDateTimeJSON string (date-time format)
DayOfWeekConverterIDayOfWeekJSON number

Dependencies

About

System.Text.Json converters for Pure.Primitives abstract types — serialize and deserialize IBool, IChar, IString, INumber<T>, IGuid, IDate, ITime, IDateTime.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

Generated from kudima03/Pure.Template