Skip to content

Main content

JSON String BOM Outside Value Flag Tool

Calculate json string bom outside value flag from explicit caller-supplied inputs.

Loading tool…

Description

Flag a BOM at text position zero separately from any BOM found in text.slice(1).

A JSON lexeme is its textual spelling, which differs from the decoded value. Escapes, quotes, raw control characters, and surrounding whitespace must be interpreted in context.

Flag a BOM at text position zero separately from any BOM found in text.slice(1).

When to use this tool

Use JSON String BOM Outside Value Flag when you need a narrowly defined JSON string or separator diagnostic.

How to use the tool and how it works

  1. Enter text. 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 leadingBom, embeddedBom. Inspect leadingBom, embeddedBom before interpreting the associated values.

Flag a BOM at text position zero separately from any BOM found in text.slice(1).1

Input fieldMeaning and unitsAccepted input
textTextRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
leadingBomLeading BomRequired. Boolean.
embeddedBomEmbedded BomRequired. Boolean.
json
{
  "input": {
    "text": "{\"a\":1}"
  },
  "output": {
    "leadingBom": true,
    "embeddedBom": false
  }
}

Limitations and assumptions

  • The embedded scan always skips the first code unit; neither flag establishes JSON validity or removes a BOM.
  • 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 the entire document when validity matters; a local pattern match cannot establish complete JSON syntax.

References

  1. Calculation and input contract: json/json-string-bom-outside-value-flag — tool.io

Similar or alternative tools