contents
1{
2 "input": {
3 "unit": "mi",
4 "value": 5
5 },
6 "output": {
7 "unit": "km",
8 "value": 8.0467
9 }
10}
The Unit Converter Response is an example response of an API which receives the the unit mi
( miles ) and then converts the miles to km
(kilometer) and then return the km
unit.
In this example, the API receives an input value of 5 miles and converts it to the equivalent value in kilometers. The input value and units are specified in the "input" object, and the converted value and units are specified in the "output" object. The converted value of 8.0467 kilometers is rounded to four decimal places.