Wrong type for json parse
Opened this issue · 1 comments
Krzywson commented
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
You can copy paste data (body) to postman and call your endpoint for replicate
- Details of the error message if there is any
Trying deserialize it with Newton and some other wild combinations with system.text.json settings
Mertsch commented
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