Problem
Default date json to/from converter saves date in local time zone. That's dangerous, especially when we synchronise entries between the devices. So we need to save date in UTC. We have custom DateTimeJsonConverter, but for it to work it needs to be added manually as attribute of every entry class. It's not convenient and easy to forget.
What to do
There are 2 main ideas. Both working when user run alex code gen.
First: check that all the @JsonSerialized classes has attribute, if not - print bad classes and fail.
Second: automatically add attribute @DateTimeJsonConverter to the all @JsonSerialized. It's more convenient, but may be hard to implement.
Of course we need an options in alex configuration to enable/disable this behaviour (enabled by default).
Problem
Default date json to/from converter saves date in local time zone. That's dangerous, especially when we synchronise entries between the devices. So we need to save date in UTC. We have custom
DateTimeJsonConverter, but for it to work it needs to be added manually as attribute of every entry class. It's not convenient and easy to forget.What to do
There are 2 main ideas. Both working when user run
alex code gen.First: check that all the
@JsonSerializedclasses has attribute, if not - print bad classes and fail.Second: automatically add attribute
@DateTimeJsonConverterto the all@JsonSerialized. It's more convenient, but may be hard to implement.Of course we need an options in alex configuration to enable/disable this behaviour (enabled by default).