Description
Validate JSON number grammar, then lowercase the exponent marker, remove an exponent plus sign, and strip redundant exponent leading zeros.
A JSON number's grammar, decimal spelling, and parsed binary value are different layers. Exponents, leading zeros, and negative zero can carry lexical information lost during numeric conversion.
Validate JSON number grammar, then lowercase the exponent marker, remove an exponent plus sign, and strip redundant exponent leading zeros.
When to use this tool
Use JSON Number Exponent Sign Normalizer when you need a numeric token's spelling or serialization convention.
How to use the tool and how it works
- Enter lexeme. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read canonical. Use the output convention below.
Validate JSON number grammar, then lowercase the exponent marker, remove an exponent plus sign, and strip redundant exponent leading zeros.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| lexeme | Supplied token spelling; it is not automatically decoded text. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| canonical | Canonical | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"lexeme": "1E+003"
},
"output": {
"canonical": "1e3"
}
} Limitations and assumptions
- Mantissa spelling is preserved and a negative zero exponent keeps its minus sign; this is not whole-number canonicalization.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use an exact decimal parser when preserving large integers, decimal scale, or lexical round trips is required.
References
Similar or alternative tools
- JSON Number Exponent Negative Zero Label
Validate the number token and inspect exponent presence, its minus sign, and whether every exponent digit is zero.
- JSON: JSON Number Exponent Field Split
Validate a JSON number and return mantissa plus separate optional exponent marker, sign, and digit strings.