Skip to content

Architecture

At a high-level, Getty consists of two flows: a serialization and a deserialization flow.

Architecture Architecture

In the serialization flow:

  1. A Zig value is passed to Getty.
  2. Based on the value's type, a serialization block is selected and executed by Getty.
  3. The block serializes the passed-in value into Getty's data model.
  4. The resulting value is passed to a Serializer, which serializes it into an output data format.

In the deserialization flow:

  1. A Zig type is passed to Getty.
  2. Based on the type, a deserialization block is selected and executed by Getty.
  3. The block prompts a Deserializer to deserialize its input data into Getty's data model.
  4. The resulting value is passed to a Visitor, which converts it into a value of the initial type.