Description
Parse an ID that must be a JSON string or number.
Feature properties and foreign members are JSON metadata, distinct from the geometry coordinates. Exact key operations and ID type checks can preserve useful distinctions, but do not independently authenticate records or validate an entire Feature.
Parse an ID that must be a JSON string or number.
When to use this tool
Use Feature ID Leading Zero String Guard when you need a literal GeoJSON metadata, identifier, or shallow-key operation.
How to use the tool and how it works
- Enter idJson. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read stringId, losesZerosIfNumeric. Inspect stringId, losesZerosIfNumeric before interpreting the associated values.
Parse an ID that must be a JSON string or number. Report whether it is a string and whether a string matches the entire pattern 0 followed by one or more decimal digits.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| idJson | Id Json | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| stringId | String Id | Required. Boolean. |
| losesZerosIfNumeric | Loses Zeros If Numeric | Required. Boolean. |
{
"input": {
"idJson": "\"0012\""
},
"output": {
"stringId": true,
"losesZerosIfNumeric": true
}
} Limitations and assumptions
- The leading-zero flag covers this exact nonnegative digit pattern, not every spelling that numeric conversion could alter. No conversion, uniqueness check, or ID assignment occurs.
- 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
Validate the complete Feature and its intended data model after editing. Preserve identifier precision and distinguish null values, absent members, collisions, and nested properties explicitly.
References
Similar or alternative tools
- Feature ID Number String Type Tag
Parse the supplied ID JSON value, label null explicitly and other values by JavaScript type, and accept only string or number identifiers.
- Graph Label Canonical Number String Guard
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.