You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have overriden RequestHandler<I, O> with my lambda. All the jackson's annotations in my pojo (PreSignUpEvent) are ignored (Tested with JsonProperty so far). => The attributes that does not require an annotation are correctly deserialized (Because the attribute's name is the same than the object attribute's name) but not the ones with 2 different names (that's why I need to use JsonProperty annotation)
I'm using jackson v2 annotations.
I tried with RequestStreamHandler, calling in my lambda 'new ObjectMapper().readValue(InputStream, MyPojo.class)' and it worked. The annotations are taken into account.
My pojo and the lambda (just for the example here, I tried with the field 'version' -> versionn):
Activity
mancioshell commentedon Jan 27, 2025
any updated?
smirnoal commentedon Jan 27, 2025
you might want to try custom serialisation to achieve the desired behaviour. Take a look at https://docs.aws.amazon.com/lambda/latest/dg/java-custom-serialization.html
mancioshell commentedon Jan 27, 2025
Thank you for your reply.
I'm using it for my lambda, but it seems does not work with
aws-lambda-java-testsI have this unit test:
with this pojo:
but with the following json (event.json):
{ "timestamp": "timestamp", "repo_ms": "myrepot", "repo_ms_commit": "mycommit", }commit and repository field results null.