Description
Parse valueJson, reject arrays and objects, and return null, boolean, number, or string as the scalar type.
JSON distinguishes null, strings, numbers, Booleans, arrays, and objects. Parsing a token produces a value whose type can differ from its apparent textual spelling.
Parse valueJson, reject arrays and objects, and return null, boolean, number, or string as the scalar type.
When to use this tool
Use JSON: JSON Scalar Type Tag when you need one bounded JSON value classification or wrapper operation.
How to use the tool and how it works
- Enter valueJson. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Parse valueJson, reject arrays and objects, and return null, boolean, number, or string as the scalar type.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| valueJson | Value Json | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.type | Type | Calculated result member: string. |
{
"input": {
"valueJson": "false"
},
"output": {
"result": {
"type": "boolean"
}
}
} Limitations and assumptions
- Numeric token spelling is not preserved; this classifies the parsed JavaScript value.
- Outputs are nested inside result. 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 a full document parser and the consuming schema when complete validation or exact numeric preservation is required.
References
Similar or alternative tools
- JSON Scalar Kind To Schema Type
Parse valueJson and distinguish null, array, integer-valued number, other numbers, and the remaining JavaScript value types.
- JSON Patch Test Number String Type Inequality
Parse firstJson and secondJson, require both values to be scalars, and compare with strict equality.