DTOMaker.Runtime.JsonSystemText
1.0.18-dev
See the version list below for details.
dotnet add package DTOMaker.Runtime.JsonSystemText --version 1.0.18-dev
NuGet\Install-Package DTOMaker.Runtime.JsonSystemText -Version 1.0.18-dev
<PackageReference Include="DTOMaker.Runtime.JsonSystemText" Version="1.0.18-dev" />
<PackageVersion Include="DTOMaker.Runtime.JsonSystemText" Version="1.0.18-dev" />
<PackageReference Include="DTOMaker.Runtime.JsonSystemText" />
paket add DTOMaker.Runtime.JsonSystemText --version 1.0.18-dev
#r "nuget: DTOMaker.Runtime.JsonSystemText, 1.0.18-dev"
#:package DTOMaker.Runtime.JsonSystemText@1.0.18-dev
#addin nuget:?package=DTOMaker.Runtime.JsonSystemText&version=1.0.18-dev&prerelease
#tool nuget:?package=DTOMaker.Runtime.JsonSystemText&version=1.0.18-dev&prerelease
DTOMaker
Warning: This is pre-release software under active development. Breaking changes may occur.
A collection of model-driven compile-time source generators for quickly creating DTOs (Data Transport Objects) supporting the following serialization schemes:
- JSON
and related types.
Workflow
---
title: Workflow
---
flowchart LR
def(Define models e.g. IMyDTO.cs)
ref1(Reference DTOMaker.Models.*)
ref2(Reference DTOMaker.Runtime.*)
ref3(Reference one or more source generators e.g. DTOMaker.MessagePack)
bld(VS/Code/MSBuild)
pkg(Assembly)
ref1-->def
def-->ref2
def-->ref3
ref2-->bld
ref3-->bld
bld-->pkg
Models are defined as C# interfaces with additional attributes. Here's a trivial example:
[Entity][Id(1)]
public interface IMyFirstDTO
{
[Member(1)] string Name { get; set; }
}
If using the MessagePack source generator, the following implmentation will be generated (simplified):
[MessagePackObject]
public sealed class MyFirstDTO : EntityBase, IMyFirstDTO, IEquatable<MyFirstDTO>
{
[Key(1)] string Name { get; set; }
}
Included Packages
This repo includes the following packages:
DTOMaker.JsonSystemText
A source generator that creates DTOs (Data Transport Objects) that are serializable to JSON.
DTOMaker.Runtime
Common types used at runtime by DTOMaker generated entities.
Model features
- Member value types: Boolean, S/Byte, U/Int16/32/64/128, Double, Single, Half, Char, Guid, Decimal
- String member types
- Binary member types (Octets)
- polymorphic types
- generic types
- entity members
- Built-in freezability (mutable until frozen) support
- [Obsolete] members
- Fixed length arrays of above value types.
- IEquatable<T> support
- Templates as testable code, template-to-generator processing.
MemBlocks features
- auto-embedded string, binary and entity members when encoded < 63 bytes.
- fixed-length string and binary member types.
!Limitations
Single compilation unit
All models and generated DTOs are contained within a single assembly. Models cannot reference types in other projects or packages (other than native or built-in types). Generated classes are partial, which can help you mitigate the single assembly constraint.
Development
In progress
- custom struct members (to avoid primitive obsession)
Coming soon
- Json (System.Text) generator
- upgrade source generators to IIncrementalGenerator
- global interface equality comparer
- reservation (hidden members)
- Orleans generator
- ProtobufNet 3.0 generator
- MessagePack 3.x generator
- NetStrux generator
- MemBlocks compact layout method
- Enum data types. Workaround - enums can be implemented with an underlying integer property and a cast.
- MemBlocks nullable types. Workaround - T? can be implemented with a pair of members (Boolean, T).
Coming later
- Google Protobuf .proto generation
- model.json generation
- command-line alternative
- variable length arrays
- logical value equality
- Rune member types
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- DataFac.Memory (>= 0.15.2)
- DTOMaker.Runtime (>= 0.70.2)
- Microsoft.Bcl.HashCode (>= 6.0.0)
- System.Memory (>= 4.6.3)
- System.Text.Json (>= 9.0.8)
-
net8.0
- DataFac.Memory (>= 0.15.2)
- DTOMaker.Runtime (>= 0.70.2)
- Microsoft.Bcl.HashCode (>= 6.0.0)
- System.Memory (>= 4.6.3)
- System.Text.Json (>= 9.0.8)
-
net9.0
- DataFac.Memory (>= 0.15.2)
- DTOMaker.Runtime (>= 0.70.2)
- Microsoft.Bcl.HashCode (>= 6.0.0)
- System.Memory (>= 4.6.3)
- System.Text.Json (>= 9.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.7.22 | 23 | 1/18/2026 |
| 1.7.20-dev | 24 | 1/18/2026 |
| 1.7.18-dev | 29 | 1/18/2026 |
| 1.7.8-dev | 30 | 1/17/2026 |
| 1.7.1-dev | 83 | 1/8/2026 |
| 1.6.12 | 82 | 1/6/2026 |
| 1.6.10 | 87 | 1/4/2026 |
| 1.6.2 | 85 | 1/3/2026 |
| 1.6.1 | 87 | 1/3/2026 |
| 1.5.23 | 87 | 1/1/2026 |
| 1.5.22-dev | 80 | 1/1/2026 |
| 1.5.19-dev | 79 | 1/1/2026 |
| 1.5.18-dev | 87 | 12/28/2025 |
| 1.5.13-dev | 84 | 12/27/2025 |
| 1.5.4-dev | 125 | 12/26/2025 |
| 1.4.17 | 159 | 12/26/2025 |
| 1.4.16 | 169 | 12/25/2025 |
| 1.4.10 | 166 | 12/24/2025 |
| 1.4.8 | 174 | 12/24/2025 |
| 1.4.7-dev | 168 | 12/23/2025 |
| 1.4.4-dev | 164 | 12/22/2025 |
| 1.3.6 | 124 | 12/20/2025 |
| 1.3.5-dev | 122 | 12/20/2025 |
| 1.3.4-dev | 135 | 12/20/2025 |
| 1.3.3-dev | 219 | 12/19/2025 |
| 1.2.11 | 259 | 12/17/2025 |
| 1.2.10 | 257 | 12/17/2025 |
| 1.2.9 | 261 | 12/17/2025 |
| 1.2.8-dev | 260 | 12/17/2025 |
| 1.2.7-dev | 258 | 12/17/2025 |
| 1.0.27 | 155 | 10/3/2025 |
| 1.0.26 | 297 | 9/19/2025 |
| 1.0.25 | 320 | 9/17/2025 |
| 1.0.23 | 193 | 9/10/2025 |
| 1.0.22 | 188 | 9/10/2025 |
| 1.0.18-dev | 144 | 9/5/2025 |
| 1.0.17-dev | 139 | 9/5/2025 |
| 1.0.15-dev | 157 | 9/5/2025 |
| 1.0.14-dev | 171 | 9/5/2025 |
| 1.0.13-dev | 182 | 9/5/2025 |
| 1.0.11-dev | 202 | 9/4/2025 |
| 1.0.9-dev | 193 | 9/4/2025 |