Add JSON serializer to every model class?

前端 未结 9 1432
南旧
南旧 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:24

    An alternative is to use the Serialization package and add rules for your classes. The most basic form uses reflection to get the properties automatically.

提交回复
热议问题