chore: use json/v2
@Maschga I was expecting this PR to be a no-up. Could you figure out why the tests break? Maywe we've not providing the JSON expected after all?
The problem is that now GET /api/sessions returns chargeDuration with the unit seconds and previously it had the unit nanoseconds.
No idea why this happens.
No idea why this happens.
Because I've generally changed this to match precondition and others. Could I ask you to open a new PR to export duration in seconds in order to do this consistently everywhere?
I don't quite understand what you mean by export duration in seconds.
Have you not yet changed duration from int64 to time.Duration?
Should I correct the tests? Or is it something else?
With this PR- and in future- we will always un/marshal time.Duration in JSON in seconds. Today, it‘s mixed- planner in seconds, sessions in ns. To fix this, we can make it consistent today or with this PR. In both cases, we‘ll need to change the sessions behaviour of the UI wich expects nano-seconds atm.