Be more generic over the type being serialized, and remove an intermediate struct which was only used for serialization but isn't necessary.
Be more generic over the type being serialized, and remove an intermediate struct which was only used for serialization but isn't necessary.