Add JSON serializer to every model class?

前端 未结 9 1430
南旧
南旧 2020-11-28 07:56

When it comes to JSON encoding in Dart, per Seth Ladd\'s accouncement the finally approved now official way to go is dart:convert + JSON.Encode.

9条回答
  •  遥遥无期
    2020-11-28 08:32

    I prefer using https://ashamp.github.io/jsonToDartModel/ online tool write by myself.

    It has features below:

    • online use, without plugin
    • support multidimensional list
    • support complex json
    • support convert all props to String type
    • empty props warning
    • single file
    • dart keyword protected
    • instant convert

    I think it's better than other tools.Welcome if you have any suggestion, issue or bug report.

提交回复
热议问题