Skip to content

Main content

JSON Number Exponent Negative Zero Label Tool

Inspect the exponent lexeme’s own zero/sign spelling in strict JSON numeric text without relying on JSON.parse to preserve it.

Loading tool…

Description

Validate the number token and inspect exponent presence, its minus sign, and whether every exponent digit is zero.

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 the number token and inspect exponent presence, its minus sign, and whether every exponent digit is zero.

When to use this tool

Use JSON Number Exponent Negative Zero Label when you need a numeric token's spelling or serialization convention.

How to use the tool and how it works

  1. Enter token. 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 exponentPresent, exponentNegative, exponentZero, negativeExponentZero. Inspect exponentPresent, exponentNegative, exponentZero, negativeExponentZero before interpreting the associated values.

Validate the number token and inspect exponent presence, its minus sign, and whether every exponent digit is zero. Mark negativeExponentZero when both sign and zero conditions hold.1

Input fieldMeaning and unitsAccepted input
tokenTokenRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
exponentPresentExponent PresentRequired. Boolean.
exponentNegativeExponent NegativeRequired. Boolean.
exponentZeroExponent ZeroRequired. Boolean.
negativeExponentZeroNegative Exponent ZeroRequired. Boolean.
json
{
  "input": {
    "token": "1.2e-00"
  },
  "output": {
    "exponentPresent": true,
    "exponentNegative": true,
    "exponentZero": true,
    "negativeExponentZero": true
  }
}

Limitations and assumptions

  • These are lexical flags independent of coefficient sign or numeric negative zero.
  • 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-negative-zero-label — tool.io

Similar or alternative tools