toJson method

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

Returns the information stored in this object in a way the it could be encoded via jsonEncode().

Implementation

@override
Map<String, dynamic> toJson() {
  final Map<String, dynamic> newJson = <String, dynamic>{};
  newJson[DirectoryKeys.classString] = classString;
  if (identifier != null) newJson[DirectoryKeys.identifier] = identifier;
  if (links != null) newJson[DirectoryKeys.links] = links;
  if (values != null) newJson[DirectoryKeys.values] = values;
  return newJson;
}