Implement Serializer class.