toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['compressionlevel'] = this.compressionLevel;
  data['height'] = this.height;
  data['infinite'] = this.infinite;
  if (this.layers != null) {
    data['layers'] = this.layers?.map((v) => v.toJson()).toList();
  }
  data['nextlayerid'] = this.nextLayerId;
  data['nextobjectid'] = this.nextObjectId;
  data['orientation'] = this.orientation;
  data['renderorder'] = this.renderOrder;
  data['tiledversion'] = this.tiledVersion;
  data['tileheight'] = this.tileHeight;
  if (this.tileSets != null) {
    data['tilesets'] = this.tileSets?.map((v) => v.toJson()).toList();
  }
  data['tilewidth'] = this.tileWidth;
  data['type'] = this.type;
  data['version'] = this.version;
  data['width'] = this.width;
  return data;
}