Table of Contents

Getting Started

Installation

Consume this ShapeShift via its NuGet Package. Click on the badge to find its latest version and the instructions for consuming it that best apply to your project.

ShapeShift NuGet package
ShapeShift.Json NuGet package
ShapeShift.MsgPack NuGet package
ShapeShift.Cbor NuGet package
ShapeShift.Yaml NuGet package
ShapeShift.Protobuf NuGet package
ShapeShift.Taml NuGet package

Usage

Pick a format package, annotate the types you serialize with PolyType's GenerateShapeAttribute, and create a serializer:

var serializer = new JsonSerializer
{
    PropertyNamingPolicy = ShapeShiftNamingPolicy.CamelCase,
    Indented = true,
};

var person = new Person("Ada", ["mathematics", "programming"]);
string json = serializer.Serialize(person);
Person? copy = serializer.Deserialize<Person>(json);

From there: