toJson method

dynamic toJson ()

Implementation

toJson() {
  final Map<String, dynamic> j = {'type': type};
  if (id != null) j['id'] = id;
  if (attributes != null) j['attributes'] = attributes;
  if (meta != null) j['meta'] = meta;
  if (self != null) j['links'] = {'self': self};
  if (_relationships.isNotEmpty) j['relationships'] = _relationships;

  return j;
}