Closed brennan-karrer closed 5 years ago
@brennan-karrer it seems like what you have should work, though I can't confirm whether using @derive
is the culprit. Are you able to confirm that JaSerializer uses the formatter if you remove the @derive
line?
@beerlington I haven't tested it out without utilizing the @derive
as we need that line in order to map data from Dynamo to the appropriate structure. I'll have to create a dummy application and test out if it works without the @derive
annotation.
@brennan-karrer were you able to resolve this?
Closing since there hasn't been a response
I'm having an issue trying to get a custom attribute formatter working for the structs in my application. Per the documentation, I should be able to do so via the following:
Here's an example of how I'm trying to implement the
Formatter
protocol for my struct:The only thing that I could think of is maybe the Formatter module doesn't like me trying to pass a struct derived from my Dynamo module? Neither of these functions ever get hit so I'm a bit confused.
Any help would be much appreciated.