MrNiamh
10/11/2023, 4:40 PMclass NoteId(value: UUID): AbstractValue<UUID>(value)
This seems to kind of work, however now it's returning in my API as:
"id" : {
"value" : "00000000-0000-0000-0000-000000000000"
}
Instead of what i'd prefer which is
"id" : "00000000-0000-0000-0000-000000000000"
I am trying to avoid adding each ID to my ConfigurableJackson
as there's potentially quite a few. I tried to see where the AbstractValue
was being auto-converted but couldn't see it anywhere in the ConfigurableJackson
.
Not sure if i'm missing something obvious here.Andrew O'Hara
10/11/2023, 4:48 PMConfigurableJackson
is the best way I know of.James Richardson
10/11/2023, 4:49 PMdave
10/11/2023, 4:51 PMMrNiamh
10/11/2023, 5:11 PMAndrew O'Hara
10/11/2023, 5:28 PMValueFactory
properly, you should have something like this:
class UserId private constructor(value: UUID): UuidValue(value) {
companion object: UuidValueFactory<UserId>(::UserId)
}
val myJson = Jackson.custom {
value(UserId)
}
dave
10/11/2023, 5:30 PMAndrew O'Hara
10/12/2023, 1:56 PMMrNiamh
10/12/2023, 1:57 PM