Skip to content

Main content

CBOR Break Context Token Tool

Check a break octet against the supplied immediate CBOR container state.

Loading tool…

Description

Check a break octet against supplied container context.

CBOR initial bytes combine major type and additional information. Some fields are reserved or context-dependent, and a break marker is meaningful only within a correctly tracked indefinite-length container.

Check a break octet against supplied container context.

When to use this tool

Use CBOR Break Context Token when inspecting one explicit CBOR field or supplied break context.

How to use the tool and how it works

  1. Enter octet, container, indefinite, expectingMapValue. 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 isBreak, permitted. Inspect isBreak, permitted before interpreting the associated values.

Check a break octet against supplied container context. Require a supported container label; isBreak tests 255, and permitted additionally requires indefinite length, a non-none container and no pending map value.1

CBOR splits the initial octet into major type and additional information. Reserved or indefinite forms need type and container context beyond a bit-field split.2

Input fieldMeaning and unitsAccepted input
octetOne numeric octet, from 0 through 255.Required. Safe integer; minimum 0; maximum 255.
containerContainerRequired. Text; one of "array", "map", "bytes", "text", "none"; maximum UTF-16 length 8192.
indefiniteIndefiniteRequired. Boolean.
expectingMapValueExpecting Map ValueRequired. Boolean.
Output fieldInterpretationReturned shape
isBreakIs BreakRequired. Boolean.
permittedLocal context predicate for octet 255; requires suitable indefinite container and no outstanding map value.Required. Boolean.
json
{
  "input": {
    "octet": 255,
    "container": "map",
    "indefinite": true,
    "expectingMapValue": false
  },
  "output": {
    "isBreak": true,
    "permitted": true
  }
}

Limitations and assumptions

  • Context is supplied and may be inconsistent; this is not a full nested CBOR parser.
  • 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.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use a complete CBOR parser to track nesting, following arguments and type-specific validity.

References

  1. Calculation and input contract: decode/cbor-break-context-token — tool.io

  2. RFC 8949: Concise Binary Object Representation — RFC Editor

Similar or alternative tools