Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1.39 KB

Csharp.md

File metadata and controls

27 lines (15 loc) · 1.39 KB

C#

There are special use-cases that each language supports; this document pertains to C# models.

Generate serializer and deserializer functionality

Sometimes you want to serialize the data models into JSON. In order to do that use the preset CSHARP_JSON_SERIALIZER_PRESET

External dependencies: Requires System.Text.Json, System.Text.Json.Serialization and System.Text.RegularExpressions to work.

Check out this example for a live demonstration.

Generate models with equals and GetHashCode methods

To overwrite the Equal and GetHashCode methods, use the preset CSHARP_COMMON_PRESET and provide the options equal: true and hashCode: true

Check out this example for a live demonstration.