Converts the custom field value to a JSON-compatible representation.
@override Map<String, dynamic> toJson() { return {'type': 'int', 'value': value}; }