Modified a way to serialize PointField