toJson method

  1. @override
Map<String, dynamic> toJson()

Converts this class object into a JSON value.

Implementation

@override
Map<String, dynamic> toJson() {
  final result = {
    "contentType": contentType,
    ...additionalFields,
  };

  if (success) {
    result["success"] = success;
  }

  if (schema != null) {
    result["schema"] = schema;
  }

  return result;
}