Class JsonTypeNotAllowedException

All Implemented Interfaces:
Serializable

public class JsonTypeNotAllowedException extends JsonReadException
Thrown when JSON that carries type information names a type the reader is not allowed to instantiate.

This is a refusal rather than a failure: the document is well formed, but honouring it would mean constructing whatever it asked for. Register the type if it is one of yours.

See Also:
  • Constructor Details

    • JsonTypeNotAllowedException

      public JsonTypeNotAllowedException(String typeId, Throwable cause)
  • Method Details

    • typeId

      public String typeId()
      The type named in the document, as it was named there.