Hey. I have a very "stupid" problem, sorry 😅
So I'm using Arrow with spring boot, and I'm having problems with deserializing Options and Eithers (haven't tested other data types).
It seems to be converting the inner state into JSON instead of the "value". I feel like I'm doing something incredibly stupid here. Any hints? I've put more details here with a minimal working example https://github.com/arrow-kt/arrow-integrations/issues/105
I'm using it (I register the Arrow module in the example on the issue)
s
Sam
11/24/2022, 4:27 PM
Ah, gotcha, I did not spot that 👍
s
stojan
11/25/2022, 10:29 AM
typically I use nullable types instead of Option in my DTOs.... also, typically I never have
Either
in my DTOs....
converting from domain type to DTO is always valid, so no need for
Either
converting from DTO to domain object can fail, but in that case I get
Either<SomeError, DomainObject>
, so Either is on the outside
e
Eduardo Barbosa
11/25/2022, 11:05 AM
That's a good observation, thank you! I went with a marked interface for the DTO and converted between the Either to that new DTO.
For the sake of this thread, the issue is fixed in the new release.