Class JsonValueException

All Implemented Interfaces:
Serializable

public final class JsonValueException extends RuntimeException
Indicates that an error has been detected while traversing the JsonValue. This exception is thrown under the following conditions:
  • An access or a conversion method is invoked on a JsonValue of an incompatible type. For example, calling asBoolean() on a JsonString.
  • An access method is invoked for a non-existent value, such as get(String) for a missing member in a JsonObject, or get(int) for an out-of-bounds index in a JsonArray.
  • asInt() or asLong() is invoked on a JsonNumber that cannot be represented without loss of information by the target type.
  • asDouble() is invoked on a JsonNumber whose string representation cannot be converted to a finite double.
Since:
99
See Also:
  • Constructor Details

    • JsonValueException

      public JsonValueException(String message)
      Constructs a JsonValueException with the specified detail message.
      Parameters:
      message - the detail message