I used Http request to get data from API.
But when there are decimal numbers in the data, the robot rounds the numbers and cancels the decimal places
Is there a way to prevent this thing?
Thanks.
Bakr
update:
I used Http request to get data from Server.
after that I print response string to see if there Decimals number in string and I found
after that I use this function jsonConvert.DeserializeObject(of DataTable)(normalResponse)
to convert response string to DataTable.
but in this step the robot round all decimal number and all decimals
this is image now:
Json string befor converting to DT, if you remark I have 548.8 value
Private Sub SurroundingSub()
Dim jsonString As String = “[{”“Column1"”:1.0,““Column2"”:0.0,”“Column3"”:1.0}]"
Dim settings As JsonSerializerSettings = New JsonSerializerSettings With {
.FloatParseHandling = FloatParseHandling.Decimal
}
End Sub
I created a new variable with JsonSerializerSetting type an called it jsonSettings.
after that I gave it this value NewJsonSerializerSettings With {.FloatParseHandling = FloatParseHandling.Decimal} by Assign activity.