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

Wrong type for json parse #746

Open
Krzywson opened this issue Jun 26, 2023 · 1 comment
Open

Wrong type for json parse #746

Krzywson opened this issue Jun 26, 2023 · 1 comment

Comments

@Krzywson
Copy link

Woo - 6
Woo.Net - 0.8.6

  • Steps to replicate the issue

Create an webhook in store which is called when somebody place order, set endpoint to your api Asp

obraz

You can copy paste data (body) to postman and call your endpoint for replicate

  • Details of the error message if there is any

obraz
obraz

Trying deserialize it with Newton and some other wild combinations with system.text.json settings

@Mertsch
Copy link

Mertsch commented Mar 16, 2024

STJ, which is the new default for ASP.NET 6+ is much stricter when it comes to JSON handling.
You need to enforce Newtonsoft de-serialization, since it's invalid to put a number (Int64) into a string.

E.g. Remove the [FromBody] and use Newtonsoft on Request.Content (Body) directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants