Closed janhoy closed 7 years ago
It's OK for me if you wish to modify the format of date
field (not to add a new field).
Is it ok to change the spec with a back-compat break, so the date field must adhere to YYYY-mm-dd
format only? Gson seems to only accept one dateFormat at a time, so in order to accept multiple formats, we need to change date into String and provide some code to get a Date
object.
Ideally I'd like to support strictly two formats for the date field: YYYY-mm-dd
and YYYY-mm-ddTHH:MM:ss.SSSZ
(ISO, UTC), but as long as variables are public and not hidden behind getters/setters it is hard to do back-compat trickery...
Should we change PluginInfo into a proper Java bean?
We could add getters/setters for PluginInfo and PluginRelease if it's useful.
Is it ever useful to require a full date+time as release-date of a plugin?
I propose that in addition to the full date format e.g.
Mar 22, 2017 9:00:35 PM
we also allow only date in ISO format, e.g.2017-04-19
. It will be parsed to time00:00:00
internally. We no longer pick latest release by comparing dates, only versions, so there should be no downside to this.Don't know how to instruct GSon parser into understanding that format but I guess it is doable.