Allows you to serialize object.
Map<String, dynamic> toJson() => {"fields": fields.map((e) => e.toJson()).toList()}.clearNulls();