I’m currently facing a new issue: when I make an API call using an HTTP request locally, I observe that a data value is 76.8. However, after deserializing the JSON response, the value becomes rounded to 77.
How can I solve this issue? I appreciate your suggestions.
Image : 1
Image : 2
Hi @Joy_Ballav1 ,
Could you maybe check the below post :
When using JsonConvert.DeserializeObject(Of DataTable)(), sometimes, double values are rounded after the conversion it is made. How to avoid this rounding issue?
Issue Description: When converting a Json string to a data table using the JsonConvert.DeserializeObject(Of DataTable)() method, double values may be rounded after the conversion is made.
Example of Issue:
Observe Json String that is passed in for conversion. Make note of the sapAmout as well as unitPrice & lineAmount.
[image]
…
1 Like
Thanks but this solution is not clear. here in this solution what is datagrid pdf referees?
Can you please help me ?
Anil_G
(Anil Gorthi)
November 12, 2023, 5:43am
4
@Joy_Ballav1
It is one of the key in the json which has the json array, please check below
In your case instead of deserializing to datatable first convert to json array and then loop and use assign as is
Cheers