Me too. But my question is a little bit about another.πŸ˜€
I have a big task and one of points - migrate all controllers from GSON to
Jackson. So, I'm going to remove all GSON serialization in the future. All
controllers which use GSON work on "custom" not good serialization, and
this converts LocalDate to array dates... So, all APIs have been working
with array dates format. You can find this configuration above as I have
written.
I have checked web application code and it has a handler for array dates
and for ISO_DATE_FORMAT, this is good! But, what about mobiles? Do they
have this handler as in a web app for a different format..?

I have migrated many controllers from gson to jackson and now have stopped
on controller AccountsApiResource, because in integration tests for this
controller we expect LocalDate as array dates.. And this a little bit
shocked me.. Yes, of course, I can add
custom annotation JsonLocalDateArrayFormat for response, but what about
other controllers, at least (40-50) ? It works because in integration tests
we don't check format date, therefore everything is good...
Ok, for the web app it'll work, but what about mobile ?

If a mobile client has a handler like in the web app - so this is good and
we can close this discussion.

On Tue, Apr 15, 2025 at 11:49β€―PM Bekhruz Iskandarzoda <
bekh...@bankplanet9.com> wrote:

> Hi all,
>
> I completely agree with Arnold. Using ISO_DATE_FORMAT is a much better and
> cleaner approach, and keeping the array format only for backward
> compatibility makes sense. The opt-in fallback is a good solution.
>
> Best,
>
> Bekhruz
>
>
> β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
> Regards,
> Bekhruz Iskandarzoda!
> Planet9
>
>
> Π’Ρ‚, 15 Π°ΠΏΡ€. 2025β€―Π³. Π² 12:58, Arnold Galovics <arn...@apache.org>:
>
>> Hi Viktor,
>>
>> I disagree. I don't think serializing LocalDates as arrays is a good idea
>> (and it wasn't before either). The new Jackson serialization uses the
>> ISO_DATE_FORMAT to serialize dates which is easily parseable by clients.
>>
>> So for all new APIs I'm recommending the ISO_DATE_FORMAT serialization
>> and for old APIs which we wanna keep backward compatible, just use the
>> Array serialization - although we need to move away from this for sure.
>> To keep the backward compatibility and still use the Jackson
>> serialization, I just created last week an opt-in way to fall back to the
>> old serialization approach, you can check it here:
>> https://github.com/apache/fineract/pull/4556/files
>>
>> Best,
>> Arnold
>>
>> On Tue, Apr 15, 2025 at 7:13β€―AM Viktor Pavlenko
>> <viktor.pavle...@onix-systems.com.invalid> wrote:
>>
>>> By default, Jackson should be configured to handle LocalDate as an
>>> array of dates.
>>> All controllers which use GSON work on "custom" not good serialization,
>>> and this converts LocalDate to array dates. So, all APIs have been working
>>> with array dates format. And when we migrate to Jacskon - we must follow
>>> this rule!
>>>
>>> So, I have created an issue in Jira
>>> https://issues.apache.org/jira/browse/FINERACT-2261 and PR ready to
>>> review.
>>>
>>

Reply via email to