@override Map toJson() { Map<String, dynamic> map = {'frame': frame, 'resources': resources}; if (childFrames != null) map['childFrames'] = childFrames; return map; }