Skip to main content

Documentation 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.

Prowl.Echo is a high-performance .NET serialization library built at the heart of the Prowl Game Engine. Rather than converting your objects directly to bytes or text, Echo first builds an intermediate in-memory graph of EchoObject nodes — an inspectable, traversable representation of your data that you can read, modify, and diff before committing it to any output format. That intermediate graph can then be flushed to binary or text with a single call.

What Is the EchoObject Graph?

When you call Serializer.Serialize(myObject), Echo walks your object’s fields and produces a tree of EchoObject nodes. Each node carries a strongly-typed EchoType tag (Int, Float, String, Compound, List, and more) together with the underlying value. Because the graph exists as a plain .NET object, you can inspect individual fields, patch values, compute deltas between two snapshots, or forward the graph to any output formatter — all without re-serializing from scratch.

Why Echo Instead of System.Text.Json or Newtonsoft?

Echo with source generation outperforms both System.Text.Json and Newtonsoft.Json across every operation. Deserialization is particularly dramatic: Echo is 5.56× faster than System.Text.Json and 7.84× faster than Newtonsoft.Json on complex object graphs. The [GenerateSerializer] attribute drives all of this by emitting optimized serialize/deserialize methods at compile time that bypass the reflection pipeline entirely.
Serialize:
  MessagePack          Avg:   0.0297 ms  (1.64x faster)
  Echo                 Avg:   0.0487 ms
  System.Text.Json     Avg:   0.0708 ms  (2.39x slower)
  Newtonsoft.Json      Avg:   0.1040 ms  (3.51x slower)

Deserialize:
  Echo                 Avg:   0.0200 ms
  MessagePack          Avg:   0.0470 ms  (2.35x slower)
  System.Text.Json     Avg:   0.1113 ms  (5.56x slower)
  Newtonsoft.Json      Avg:   0.1570 ms  (7.84x slower)

Round-trip:
  Echo                 Avg:   0.0644 ms
  MessagePack          Avg:   0.0714 ms  (1.11x slower)
  System.Text.Json     Avg:   0.1776 ms  (2.76x slower)
  Newtonsoft.Json      Avg:   0.2533 ms  (3.93x slower)
Benchmarks run with [GenerateSerializer] and [FixedEchoStructure] on a complex object graph: 20 nested objects, 100-element arrays, and 50-entry dictionaries.

Key Features

  • Source generation[GenerateSerializer] emits a complete ISerializable implementation at compile time. Primitives, strings, enums, DateTime, Guid, TimeSpan, and common collections are all inlined. Zero reflection overhead at runtime.
  • Circular reference support — Object graphs with cycles serialize and deserialize correctly out of the box; no special configuration required.
  • Polymorphism — Echo preserves concrete type information through a $type envelope so that abstract fields and interface-typed members round-trip to the exact derived type.
  • Multiple output formats — The same EchoObject graph can be written to binary (compact, ideal for I/O-bound workloads) or to human-readable text. Additional format support covers a wide range of serialization targets.
  • Rich attribute system — Control serialization behavior field-by-field:
    • [SerializeField] — include a private field in serialization.
    • [SerializeIgnore] — exclude a public field.
    • [IgnoreOnNull] — omit a field when its value is null.
    • [SerializeIf("MethodName")] — conditionally serialize based on a boolean member.
    • [FormerlySerializedAs("oldName")] — migrate renamed fields without data loss.
    • [FixedEchoStructure] — enable compact positional serialization for stable, fixed-layout types like vectors or network packets.
  • Broad type support — Primitives, complex objects, List<T>, arrays (including multi-dimensional and jagged), HashSet<T>, Stack<T>, Queue<T>, LinkedList<T>, Dictionary<TKey, TValue>, enums, DateTime, Guid, nullable types, anonymous types, and circular references all work out of the box.
  • 470+ tests — An extensive test suite ensures stability and correctness across every supported type and edge case.
  • Multi-framework — Targets net6.0, net7.0, net8.0, and net9.0.

Explore the Documentation

Quickstart

Serialize your first object and round-trip it to binary and text in under five minutes.

Source Generation

Learn how [GenerateSerializer] eliminates reflection and maximizes throughput.

Output Formats

Compare binary and text formats and choose the right one for your workload.

Serializer API

Full reference for Serializer.Serialize, Deserialize, DeserializeInto, and more.

Build docs developers (and LLMs) love