Enable `createToJson` for the models
KRTirtho opened this issue · 0 comments
KRTirtho commented
In my app, there are many situations where I need to save/cache any response received from Spotify server.
spotify-dart
providers me the option to instantiate the models from Json
/Map
, but the option to converting the models to Json
/Map
isn't available. Since, spotify-dart
uses JsonSerializable
to achieve serialization, we can simply toggle on the toJson
method generation.
Also, I'm curious about why createToJson
is set to false and will be grateful if you let us know.
My guess is dependency size, but dart removes dead/unused code, so that shouldn't be a problem.