deserialize

open suspend override fun deserialize(charset: Charset, typeInfo: TypeInfo, content: ByteReadChannel): Any?(source)

Reads a Problem from the request body, or returns null if the receiving type is anything else, leaving the body to the next converter.

The body is decoded as UTF-8, whatever charset the request declared, and a document's own encoding pseudo-attribute is likewise not honoured. By the time the codec runs the bytes are already text. This is stated explicitly, not left implicit: it matches ProblemJsonConverter, so the two formats never disagree about the same request.

Throws

if the body is not a valid problem document. xmlutil's own XmlException is wrapped, not propagated, so catching a parse failure never requires xmlutil on the caller's classpath.