deserialize

open override fun deserialize(decoder: Decoder): Problem(source)

Reads a flat problem document: recognised members become properties, everything else becomes an extension member.

Lenient in the two ways RFC 9457 §3 requires. A standard member of the wrong JSON type gets dropped, treated as absent rather than failing the whole document. Members this codec does not recognise simply stay in extensions.

Throws

if decoder is not a JSON decoder, or if the document is well-formed JSON but not an object. §3 defines a problem detail as a JSON object, so an array or a bare string is not one.