Factories construct objects, and are used for custom serialization of objects, often either to optimize the serialization output or to support serialized objects with specialized constructors.