Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for serializing fields to Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer #696

Closed
1 task
sliedig opened this issue Jul 8, 2020 · 4 comments
Labels
closed-for-staleness feature-request A feature should be added or improved. module/lambda-client-lib third-party This issue is related to third-party libraries or applications.

Comments

@sliedig
Copy link
Contributor

sliedig commented Jul 8, 2020

Description

I have a very simple Lambda function that returns a simple class. When I use the Amazon.Lambda.Serialization.Json.JsonSerializer decorator on my function (Version="1.5.0") I get the expected result. Switching to the new Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer (Version="2.0.1") I get an empty object returned.

The same behaviour is exhibited using sam local (using SAM CLI, version 1.0.0rc1).

Attached source: HelloWorld.zip

Reproduction Steps

Logs

No logs

Environment

  • Build Version: 2.0.1
  • OS Info: OSX Mojave
  • Build Environment: VSCode + Terminal dotnet
  • Targeted .NET Platform: dotnet core 3.1.300

Resolution

  • 👋 I can/would-like-to implement a fix for this problem myself
    HelloWorld.zip

This is a 🐛 bug-report

@sliedig sliedig added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 8, 2020
@normj
Copy link
Member

normj commented Jul 9, 2020

System.Text.Json which Amazon.Lambda.Serialization.SystemTextJson depends on doesn't support serializing fields.

dotnet/runtime#876

Till it does this library won't be able to support fields.

@normj normj added feature-request A feature should be added or improved. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 9, 2020
@NGL321 NGL321 changed the title Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer serialisation issue Add support for serializing fields to Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer Jul 15, 2020
@NGL321 NGL321 added the third-party This issue is related to third-party libraries or applications. label Jul 15, 2020
@NGL321
Copy link
Contributor

NGL321 commented Jul 15, 2020

@sliedig,

I have updated the issue title to reflect that it is a feature-request (to better guide resolution). Since this is blocked by an issue in a related 3rd party library, we will have to wait until their fix is released. Once that is done, feel free to submit a Pull Request here, OR someone from the team will take a look at it when able.

😸 😷

@normj it appears that a fix was implemented on the dotnet/runtime library two days ago, so this should be included on the next release.

@sliedig
Copy link
Contributor Author

sliedig commented Jul 15, 2020

Great, thank you!

@github-actions
Copy link
Contributor

We have noticed this issue has not recieved attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness feature-request A feature should be added or improved. module/lambda-client-lib third-party This issue is related to third-party libraries or applications.
Projects
None yet
Development

No branches or pull requests

3 participants