carp_serializable 3.0.0
carp_serializable: ^3.0.0 copied to clipboard
Polymorphic JSON serialization based on json_serializable annotations.
3.0.0 #
- BREAKING replaced the built-in
Uuidclass with the uuid package, which is now re-exported- the old generator seeded a
RandomwithDateTime.now().microsecond— the sub-millisecond component (0-999), not a point in time. Being deterministic, it could only ever emit 1000 distinct ids on any device in any run, so ids collided heavily once more than a handful were generated - ids are now generated with
v4()(random) rather thanv1()(time- and MAC-based), so they no longer embed device identity or creation time - migration:
Uuid().v1(getter) becomesconst Uuid().v4()(method)
- the old generator seeded a
2.0.1 #
- bumped Flutter version to 3
2.0.0 #
- type safe annotation in class factor method, like this;
FromJsonFactory().fromJson<A>(json) - graceful handling of errors when a non-known JSON type is encountered by allowing for a "notAvailable" parameter to the fromJson factory method, like this;
FromJsonFactory().fromJson<B>(json, notAvailable: B(-1)) - refactor of universal unique IDs (UUIDs) to using the
Uuid().v1construct - extending unit test coverage (incl., e.g. exceptions)
- improvement to examples in the
example.dartfile and documentation in the API doc and README
1.2.0 #
- added support for generating universal unique IDs (UUIDs) via the
UUID.v1construct