Open azeldaniel opened 2 months ago
Summary: The pkg:json
package currently doesn't support serializing and deserializing DateTime
objects, resulting in errors when used within @JsonCodable()
classes. The user requests support for DateTime
or a workaround to handle timestamps.
Attempting to use a
DateTime
attribute within any@JsonCodable()
annotated class throws an unsupported error. DateTime is a commonly used type in dart and other languages to represent timestamps for creation data points etc.Consider the code:
It throws the following errors:
If supporting DateTime is not within the scope of this package, can you suggest a possible hack or workaround?