import 'package:json_conversion_annotation/json_conversion_annotation.dart'; /// @author NewTab @JsonConversion() class ScriptBean { String? title; String? value; bool? disabled; List? children; ScriptBean({this.title, this.value, this.disabled, this.children}); ScriptBean.fromJson(Map json) { title = json['title']; value = json['value']; disabled = json['disabled']; if (json['children'] != null) { children = []; json['children'].forEach((v) { children!.add(new ScriptChildren.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['title'] = this.title; data['value'] = this.value; data['disabled'] = this.disabled; if (this.children != null) { data['children'] = this.children!.map((v) => v.toJson()).toList(); } return data; } static ScriptBean jsonConversion(Map json) { return ScriptBean.fromJson(json); } } class ScriptChildren { String? title; String? value; String? parent; ScriptChildren({this.title, this.value, this.parent}); ScriptChildren.fromJson(Map json) { title = json['title']; value = json['value']; parent = json['parent']; } Map toJson() { final Map data = new Map(); data['title'] = this.title; data['value'] = this.value; data['parent'] = this.parent; return data; } }