Skip to content

Main content

Graph Label Canonical Number String Guard Tool

Check canonical safe-integer decimal spelling for a graph label; labels are never coerced in graph operations.

Loading tool…

Description

Require nonempty label, convert it to Number, and mark canonical only when it is a safe integer whose String conversion exactly matches the original label.

Graph identifiers and endpoints describe different kinds of equality. Two edges can connect the same vertices while remaining distinct records, and serialized numeric or string identifiers can lose distinctions during parsing or normalization.

Require nonempty label, convert it to Number, and mark canonical only when it is a safe integer whose String conversion exactly matches the original label.

When to use this tool

Use Graph Label Canonical Number String Guard when you need a literal identifier or endpoint comparison with explicit coercion rules.

How to use the tool and how it works

  1. Enter label. 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. Inspect canonical before interpreting the associated values.

Require nonempty label, convert it to Number, and mark canonical only when it is a safe integer whose String conversion exactly matches the original label.1

Input fieldMeaning and unitsAccepted input
labelLabelRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
canonicalCanonicalRequired. Boolean.
json
{
  "input": {
    "label": "01"
  },
  "output": {
    "canonical": false
  }
}

Limitations and assumptions

  • Leading plus, whitespace, leading zeros, exponent notation, decimal suffixes, and negative zero spellings fail; this checks numeric spelling rather than a valid graph identifier or registry.
  • 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

Retain original identifiers and use a declared canonical representation for storage. Resolve actual edge identity through the graph's data model rather than endpoint coincidence alone.

References

  1. Calculation and input contract: graph/graph-label-canonical-number-string-guard — tool.io

Similar or alternative tools