class Album { String rEQ; String rEQDT; String rESDT; int status; List result; Album({this.rEQ, this.rEQDT, this.rESDT, this.status, this.result}); Album.fromJson(Map json) { rEQ = json['REQ']; rEQDT = json['REQ_DT']; rESDT = json['RES_DT']; status = json['status']; if (json['result'] != null) { result = new List(); json['result'].forEach((v) { result.add(new Result.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['REQ'] = this.rEQ; data['REQ_DT'] = this.rEQDT; data['RES_DT'] = this.rESDT; data['status'] = this.status; if (this.result != null) { data['result'] = this.result.map((v) => v.toJson()).toList(); } return data; } } class Result { String sId; String title; String section; String type; String content; String charge; String recommand; String createdAt; Poster poster; double narationDuration; Poster naration; Result( {this.sId, this.title, this.section, this.type, this.content, this.charge, this.recommand, this.createdAt, this.poster, this.narationDuration, this.naration}); Result.fromJson(Map json) { sId = json['_id']; title = json['title']; section = json['section']; type = json['type']; content = json['content']; charge = json['charge']; recommand = json['recommand']; createdAt = json['createdAt']; poster = json['poster'] != null ? new Poster.fromJson(json['poster']) : null; narationDuration = json['naration_duration']; naration = json['naration'] != null ? new Poster.fromJson(json['naration']) : null; } Map toJson() { final Map data = new Map(); data['_id'] = this.sId; data['title'] = this.title; data['section'] = this.section; data['type'] = this.type; data['content'] = this.content; data['charge'] = this.charge; data['recommand'] = this.recommand; data['createdAt'] = this.createdAt; if (this.poster != null) { data['poster'] = this.poster.toJson(); } data['naration_duration'] = this.narationDuration; if (this.naration != null) { data['naration'] = this.naration.toJson(); } return data; } } class Poster { String name; String filename; int length; String type; Poster({this.name, this.filename, this.length, this.type}); Poster.fromJson(Map json) { name = json['name']; filename = json['filename']; length = json['length']; type = json['type']; } Map toJson() { final Map data = new Map(); data['name'] = this.name; data['filename'] = this.filename; data['length'] = this.length; data['type'] = this.type; return data; } }