Newtonsoft.Json by James Newton-King

<PackageReference Include="Newtonsoft.Json" Version="4.0.5" />

 TypeNameHandling

public enum TypeNameHandling
Specifies type name handling options for the JsonSerializer.
All = 3

Always include the .NET type name when serializing.

Arrays = 2

Include the .NET type name when serializing into a JSON array structure.

Auto = 4

Include the .NET type name when the type of the object being serialized is not the same as its declared type.

None = 0

Do not include the .NET type name when serializing types.

Objects = 1

Include the .NET type name when serializing into a JSON object structure.