Closed CarterLi closed 9 years ago
Yes I agree. The idea behind it was more likely to create one transformer for several types. However I never found an actual use case. What I'm thinking of is:
// first argument is the type that should be transformed
registerTransformer(DateTime, new DateTimeParser());
What about this change: https://github.com/CarterLi/dartson/commit/0a200dd791fa8c585350ff8334e0c82ef14ed133
This is resolved in version 0.2.0 which comes with several changes. Please read the updated readme file.
And I think it's better to write
instead of
which should be defined inside of class DateTimeParser