Precision & numeric values
Values are always decimal strings, not JSON numbers.This preserves decimal intent and avoids binary floating-point loss.
Correct vs invalid
json
{"value": "0.1", "from": "m", "to": "cm"}Not valid in v1:
json
{"value": 0.1, "from": "m", "to": "cm"}Accepted formats
| Format | Example | Accepted |
|---|---|---|
| Integer | "10" | Yes |
| Negative | "-10" | Yes |
| Decimal | "10.5" | Yes |
| Scientific | "1.25e6" | Yes |
| NaN / Infinity | "NaN" | No |
| Comma-separated | "1,000" | No |
| Fraction | "1/2" | No |
| With unit suffix | "10 kg" | No |
Temperature
Temperature uses affine conversion (offset + scale). Results are deterministic for the same input under the same API version.
| Input | From | To | Result |
|---|---|---|---|
"32" | F | C | "0" |
"0" | C | K | "273.15" |
"-40" | C | F | "-40" |