/** * Helper method for constructing {@link JsonParseException}s * based on current state of the parser */ protected JsonParseException _constructError(String msg) { return new JsonParseException(this, msg) .withRequestPayload(_requestPayload); }
/** * Helper method for constructing {@link JsonParseException}s * based on current state of the parser */ protected JsonParseException _constructError(String msg) { return new JsonParseException(this, msg) .withRequestPayload(_requestPayload); }
protected JsonParseException _constructError(String msg, Object arg1, Object arg2) { return new JsonParseException(this, String.format(msg, arg1, arg2)) .withRequestPayload(_requestPayload); }
protected JsonParseException _constructError(String msg, Object arg) { return new JsonParseException(this, String.format(msg, arg)) .withRequestPayload(_requestPayload); }
/** * Convenience accessor that can be called when the current * token is {@link JsonToken#VALUE_TRUE} or * {@link JsonToken#VALUE_FALSE}. *<p> * Note: if the token is not of above-mentioned boolean types, an integer, but its value falls * outside of range of Java long, a {@link JsonParseException} * may be thrown to indicate numeric overflow/underflow. */ public boolean getBooleanValue() throws IOException { JsonToken t = currentToken(); if (t == JsonToken.VALUE_TRUE) return true; if (t == JsonToken.VALUE_FALSE) return false; throw new JsonParseException(this, String.format("Current token (%s) not of boolean type", t)) .withRequestPayload(_requestPayload); }
/** * Convenience accessor that can be called when the current * token is {@link JsonToken#VALUE_TRUE} or * {@link JsonToken#VALUE_FALSE}. *<p> * Note: if the token is not of above-mentioned boolean types, an integer, but its value falls * outside of range of Java long, a {@link JsonParseException} * may be thrown to indicate numeric overflow/underflow. */ public boolean getBooleanValue() throws IOException { JsonToken t = currentToken(); if (t == JsonToken.VALUE_TRUE) return true; if (t == JsonToken.VALUE_FALSE) return false; throw new JsonParseException(this, String.format("Current token (%s) not of boolean type", t)) .withRequestPayload(_requestPayload); }
/** * Helper method for constructing {@link JsonParseException}s * based on current state of the parser */ protected JsonParseException _constructError(String msg) { return new JsonParseException(this, msg) .withRequestPayload(_requestPayload); }
/** * Helper method for constructing {@link JsonParseException}s * based on current state of the parser */ protected JsonParseException _constructError(String msg) { return new JsonParseException(this, msg) .withRequestPayload(_requestPayload); }
/** * Convenience accessor that can be called when the current * token is {@link JsonToken#VALUE_TRUE} or * {@link JsonToken#VALUE_FALSE}. *<p> * Note: if the token is not of above-mentioned boolean types, an integer, but its value falls * outside of range of Java long, a {@link JsonParseException} * may be thrown to indicate numeric overflow/underflow. */ public boolean getBooleanValue() throws IOException { JsonToken t = currentToken(); if (t == JsonToken.VALUE_TRUE) return true; if (t == JsonToken.VALUE_FALSE) return false; throw new JsonParseException(this, String.format("Current token (%s) not of boolean type", t)) .withRequestPayload(_requestPayload); }
/** * Convenience accessor that can be called when the current * token is {@link JsonToken#VALUE_TRUE} or * {@link JsonToken#VALUE_FALSE}. *<p> * Note: if the token is not of above-mentioned boolean types, an integer, but its value falls * outside of range of Java long, a {@link JsonParseException} * may be thrown to indicate numeric overflow/underflow. */ public boolean getBooleanValue() throws IOException { JsonToken t = currentToken(); if (t == JsonToken.VALUE_TRUE) return true; if (t == JsonToken.VALUE_FALSE) return false; throw new JsonParseException(this, String.format("Current token (%s) not of boolean type", t)) .withRequestPayload(_requestPayload); }