eredo / dartson

Dartson is a Dart library that can be used to convert Dart objects into a JSON string.
MIT License
79 stars 29 forks source link

Handle base class when parse / serialize an object #7

Closed CarterLi closed 6 years ago

CarterLi commented 10 years ago

It's useful when there are many common properties. For example:

abstract class BaseModel {
  int id;
  DateTime createdAt;
  DateTime updatedAt;
}

class Profile extends BaseModel {
  string name;
}

class Message extends BaseModel {
  string content;
}
eredo commented 6 years ago

Supported in 1.0.0-alpha

CarterLi commented 6 years ago

4 years old issue wow

eredo commented 6 years ago

Yeah I know. Took some time...