Serializing Dataclasses

This post is a bit of a tutorial on serializing and deserializing Python dataclasses . I&rsquo;ve been hacking on zarr-python-v3 a bit, which uses some dataclasses to represent some metadata objects. Those objects need to be serialized to and deserialized from JSON. This is a (surprisingly?) challenging area, and there are several excellent libraries out there that you should probably use. My…