Architecture
At a high-level, Getty consists of two flows: a serialization and a deserialization flow.
In the serialization flow:
- A Zig value is passed to Getty.
- Based on the value's type, a serialization block is selected and executed by Getty.
- The block serializes the passed-in value into Getty's data model.
- The resulting value is passed to a Serializer, which serializes it into an output data format.
In the deserialization flow:
- A Zig type is passed to Getty.
- Based on the type, a deserialization block is selected and executed by Getty.
- The block prompts a Deserializer to deserialize its input data into Getty's data model.
- The resulting value is passed to a Visitor, which converts it into a value of the initial type.