toJson method

Map<String, Object> toJson()

Converts a NonResourceAttributes instance to JSON data.

Implementation

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

  final tempPath = path;
  final tempVerb = verb;

  if (tempPath != null) {
    jsonData['path'] = tempPath;
  }

  if (tempVerb != null) {
    jsonData['verb'] = tempVerb;
  }

  return jsonData;
}