Description
Decode an exact CBOR negative-integer argument.
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.
Decode an exact CBOR negative-integer argument.
When to use this tool
Use CBOR Negative Integer Argument when inspecting one explicit CBOR field or supplied break context.
How to use the tool and how it works
- Enter argument. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read integer. Use the output convention below.
Decode an exact CBOR negative-integer argument. Parse decimal argument in [0,18446744073709551615] and return integer = -1-argument as exact decimal text.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| argument | Argument | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| integer | Integer | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"argument": "24"
},
"output": {
"integer": "-25"
}
} Limitations and assumptions
- This is an argument transformation, not byte decoding or tagged bignum handling.
- 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 complete CBOR parser to track nesting, following arguments and type-specific validity.
References
Similar or alternative tools
- CBOR Simple Value Initial Octet
Inspect a supported CBOR simple-value initial octet.
- Decoding: CBOR Initial Byte Fields
Split any initial octet into CBOR fields and a reserved-value flag.