toJson method

Map<String, dynamic> toJson ()

Implementation

Map<String, dynamic> toJson() {
  return {
    'subclass': runtimeType.toString(),
    if (evaluatedField != null) 'evaluatedField': evaluatedField,
    if (compare != null) 'compare': Compare.values.indexOf(compare),
    if (conditions != null)
      'conditions': conditions.map((s) => s.toJson()).toList().cast<Map<String, dynamic>>(),
    if (required != null) 'required': required,
    if (value != null) 'value': value,
  };
}