flutterchina / json_model

Generate model class from Json file. 一行命令,通过Json文件生成Dart Model类。
Other
700 stars 127 forks source link

怎么使用json生产model的任意类型 #20

Open LJjack opened 4 years ago

LJjack commented 4 years ago

{ "code": 0, "data": "Value", "message": "string", "status": "success" } 后台一般返回这种样式,data有多种类型,怎样修改json的data可以让生产的model是任意类型dynamic,或者生产的model可以是泛型的

jmeviler commented 4 years ago

{
  "@JsonKey() dynamic":"xxxxx",
}

这样?