Description
Parse valueJson and wrap it under the literal key using a computed object property.
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 and wrap it under the literal key using a computed object property.
When to use this tool
Use JSON Object Single Member Wrapper when you need one bounded JSON value classification or wrapper operation.
How to use the tool and how it works
- Enter key, valueJson. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read json. Use the output convention below.
Parse valueJson and wrap it under the literal key using a computed object property. Serialize the resulting one-member object as json.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| key | JSON-array serialization of the stated identifying fields, preserving exact strings. | Required. Text; maximum UTF-16 length 8192. |
| valueJson | Value Json | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| json | Json | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"key": "a",
"valueJson": "[1,2]"
},
"output": {
"json": "{\"a\":[1,2]}"
}
} Limitations and assumptions
- Duplicate-key policy and nested schema constraints are not relevant to this newly constructed wrapper; no merging 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
Use a full document parser and the consuming schema when complete validation or exact numeric preservation is required.
References
Similar or alternative tools
- JSON: JSON Key Literal Quotation
Serialize key as a JSON string literal using JSON.stringify and return quotedKey.
- JSON Array Singleton Unwrapper
Parse json as an array, require exactly one element, and serialize that element into valueJson.