ProblemPrimitive

A string extension value. It is written quoted, so ProblemPrimitive("30") is not the number 30.


An integer extension value.


A 64-bit integer extension value.

JSON itself has one number type and no precision guarantee (RFC 8259 §6). A consumer parsing into a double loses exactness past 2^53, so send an identifier that large as a string instead.


A floating-point extension value.

value must be finite. A JSON number (RFC 8259 §6) cannot represent NaN or Infinity, and writing one would emit a literal that conforming parsers reject. This guard sits here, at the producing edge. problemLiteral stays the unguarded escape hatch for codecs.

Throws

if value is NaN or infinite.


A boolean extension value, written as the unquoted literal true or false.