abstract class Codable { /// 将对象转换为JSON格式 Map toJson(); /// 从JSON格式创建对象 factory Codable.fromJson(Map json) { throw UnimplementedError('子类必须实现fromJson工厂构造函数'); } }