Skip to content

Main content

JSON Number Integer Fraction Token Split Tool

Calculate json number integer fraction token split from explicit caller-supplied inputs.

Loading tool…

Description

Validate and split a JSON number into signed integer text, fractional digits without the point, and an exponent token including its marker when present.

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 and split a JSON number into signed integer text, fractional digits without the point, and an exponent token including its marker when present.

When to use this tool

Use JSON Number Integer Fraction Token Split 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 integer, fraction, exponent. Use the output convention below.

Validate and split a JSON number into signed integer text, fractional digits without the point, and an exponent token including its marker when present.1

Input fieldMeaning and unitsAccepted input
tokenTokenRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
integerIntegerRequired. Text; maximum UTF-16 length 8192.
fractionDimensionless fraction under the stated convention.Required. Text; maximum UTF-16 length 8192.
exponentExponentRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "token": "-12.340e+2"
  },
  "output": {
    "integer": "-12",
    "fraction": "340",
    "exponent": "e+2"
  }
}

Limitations and assumptions

  • Empty strings denote absent fraction or exponent; no numeric conversion, canonicalization, or arbitrary-precision evaluation is done.
  • 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-integer-fraction-token-split — tool.io

Similar or alternative tools

  • JSON Number Scale Token

    Validate a JSON number token, count fractional digits, parse its optional signed exponent as a safe integer, and return decimalScale = fractionDigits - exponent.

  • JSON: JSON Number Exponent Field Split

    Validate a JSON number and return mantissa plus separate optional exponent marker, sign, and digit strings.