toJson method

Map<String, Object> toJson()

Converts a CustomResourceColumnDefinition instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  final tempDescription = description;
  final tempFormat = format;
  final tempJsonPath = jsonPath;
  final tempName = name;
  final tempPriority = priority;
  final tempType = type;

  if (tempDescription != null) {
    jsonData['description'] = tempDescription;
  }

  if (tempFormat != null) {
    jsonData['format'] = tempFormat;
  }

  jsonData['jsonPath'] = tempJsonPath;

  jsonData['name'] = tempName;

  if (tempPriority != null) {
    jsonData['priority'] = tempPriority;
  }

  jsonData['type'] = tempType;

  return jsonData;
}