Skip to content

Main content

JSON Number Exponent Sign Normalizer Tool

Compute json number exponent sign normalizer from explicit bounded inputs.

Loading tool…

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

  1. Enter lexeme. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
lexemeSupplied token spelling; it is not automatically decoded text.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
canonicalCanonicalRequired. Text; maximum UTF-16 length 8192.
json
{
  "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

  1. Calculation and input contract: json/json-number-exponent-sign-normalizer — tool.io

Similar or alternative tools