I hit some API, and in Preview tab, I’m getting object property of type Number with 1 decimal place, and in Response tab I’m getting number with 2 decimal places. What is the cause of this?
I saw similar questions, but mostly all of them had issues with long int number, but it’s not that scenario in my case.
Preview tab:
Response tab:
1
The preview tab parses the json afaik and the response tab what you generally received. If you need the trailing zero for numbers, I’d suggest using a string (instead or additionally).
Zeros at the end do not make a mathematical difference, so if you only need two decimal places because you are working with, e.g. a currency, handle just the way you display the number and do not modify the number itself.