simc / crimson

Fast, efficient and easy-to-use JSON parser and serializer for Dart.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mutable models

hawkkiller opened this issue · comments

The idea of having mutable models is bad from the start and has known limitations and issues.

Would you mind explaining what you mean by this? If you prefer final properties you're free to do so.

As I can see in the example you have mutable model with all the nullable fields. Generator also iteratively fills that model, I don't see any possibilities to make them final and not nullable.

It's just an example. Final fields work just fine with Crimson

Add a constructor with these properties. This class makes no sense without