Description
Serialize one JSON scalar and append a selected record delimiter.
JSON distinguishes a member's absence, explicit null and other scalar or container values. Source number syntax differs from finite machine-number range, and reserializing a parsed value can change its spelling. Record delimiters also belong to a stream convention rather than automatically forming one valid JSON document.
Serialize one JSON scalar and append a selected record delimiter.
When to use this tool
Use JSON Scalar Append Delimiter Choice when you already have scalarJson, delimiter and need to serialize one JSON scalar and append a selected record delimiter.
How to use the tool and how it works
- Enter scalarJson, delimiter. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read recordText. Use the output convention below.
Parse scalarJson as null, text, Boolean or finite number; reserialize and append nothing, newline or comma according to delimiter.1
JSON text represents a value with optional surrounding whitespace. Appending a comma creates a fragment for another container or record format, not a standalone JSON text.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| scalarJson | Scalar Json | Required. Text; maximum UTF-16 length 8192. |
| delimiter | Exactly none, newline or comma. A comma-terminated scalar is a record fragment, not a complete JSON document. | Required. Text; one of "none", "newline", "comma"; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| recordText | Record Text | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"scalarJson": "\"hello\"",
"delimiter": "newline"
},
"output": {
"recordText": "\"hello\"\n"
}
} Limitations and assumptions
- Input numeric spelling and negative zero need not survive reserialization. A trailing comma is a record separator, not a complete valid JSON document by itself.
- 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
Parse and validate the complete intended JSON schema or record stream when structural conformance matters. Preserve original source text when lexical spelling is significant, and decide explicitly whether absent and null members should share a default.
References
Similar or alternative tools
- JSON Single Member Default Policy
Select one JSON object member under an explicit default policy.
- JSON Number Plus Sign Rejection
Check JSON number-token syntax separately from a leading-plus flag.