toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  List<Map<String, dynamic>> productsJSON = [];
  for (var product in this.products) {
    productsJSON.add(product.toJson());
  }
  return {
    'impressionListName': this.impressionListName,
    'products': productsJSON
  };
}