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

Problem with Context.Request.BodyAs and Nullable Floats #362

Closed
ads69 opened this issue Apr 17, 2020 · 2 comments
Closed

Problem with Context.Request.BodyAs and Nullable Floats #362

ads69 opened this issue Apr 17, 2020 · 2 comments

Comments

@ads69
Copy link

ads69 commented Apr 17, 2020

Hi,
I face a strange problem
In my controller when I do lCustomerList := Context.Request.BodyAs<TCustomerList_PutPostReQuest>;

I get this reply
{ "classname": "EMVCDeserializationException", "items": [], "statuscode": 500, "reasonstring": "error", "message": "Cannot deserialize integer value for ", "data": null }
After investigating, I see that in some fields they are declared as NullableDouble
If my Body have these field as null no problem
if these field values are "real" floats, I mean something like 102.56, no problem
if the value is 102.00 no problem, but if the value is 100 then I get this kind of error message.

Any idea ?

Best regards

@ads69
Copy link
Author

ads69 commented Apr 21, 2020

Thanks Daniele, it works fine now.
have a nice day.

@danieleteti
Copy link
Owner

Good. You are welcome

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