This guide walks you through adding Prowl.Echo to a .NET project and performing your first serialize/deserialize round-trip. By the end you will have serialized a typed object to anDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl.Echo/llms.txt
Use this file to discover all available pages before exploring further.
EchoObject graph, written that graph to both a text string and a binary file, and read it back — all with real, production-ready code.
Echo serializes fields, not properties. Public fields are included automatically. Private fields require the
[SerializeField] attribute. Properties — whether auto-implemented or computed — are never serialized by design.Install via NuGet
Add the Or add it directly to your The source generator is bundled inside the same NuGet package — no separate analyzer package is required.
Prowl.Echo package to your project using the .NET CLI:.csproj file:Serialize and deserialize a basic object
Define a class with public fields and call The
Serializer.Serialize to produce an EchoObject graph. Pass that graph to Serializer.Deserialize<T> to reconstruct the original value.EchoObject returned by Serialize is a live in-memory graph. You can inspect individual nodes, compare two graphs, or patch values before writing to any output format.Round-trip to text
Call Text format is human-readable and useful for configuration files, save data, and debugging. For files on disk,
WriteToString() on the EchoObject to produce a human-readable text representation. Read it back with EchoObject.ReadFromString(string), then deserialize as normal.WriteToString(FileInfo) and ReadFromString(FileInfo) overloads are also available.Round-trip to binary
Binary format produces smaller output and is faster to read and write, making it ideal for I/O-bound workloads such as level data or network packets. Use You can also serialize to and from a
WriteToBinary and EchoObject.ReadFromBinary.BinaryWriter / BinaryReader directly when you need more control over the stream:Use [GenerateSerializer] for maximum performance
Annotate your class or struct with For small, stable value types such as vectors or colors, combine
[GenerateSerializer] and mark it partial. The source generator will emit an optimized ISerializable implementation at compile time that inlines primitive construction and bypasses the reflection pipeline entirely.[GenerateSerializer] with [FixedEchoStructure] to enable compact positional serialization — skipping field names entirely for the smallest possible output and the highest possible throughput: