toJson method

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

Serializes a Link to its RWPM JSON representation.

Implementation

@override
Map<String, dynamic> toJson() => {}
  ..putOpt("href", href)
  ..putOpt("type", type)
  ..putOpt("templated", templated)
  ..putOpt("title", title)
  ..putIterableIfNotEmpty("rel", rels)
  ..putJSONableIfNotEmpty("properties", properties)
  ..putOpt("height", height)
  ..putOpt("width", width)
  ..putOpt("bitrate", bitrate)
  ..putOpt("duration", duration)
  ..putIterableIfNotEmpty("language", languages)
  ..putIterableIfNotEmpty("alternate", alternates)
  ..putIterableIfNotEmpty("children", children);