Package Torello.JSON
Class ParseBoxedJSON
- java.lang.Object
-
- Torello.JSON.ParseBoxedJSON
-
public class ParseBoxedJSON extends java.lang.Object
Builds on the J2EE Standard Release JSON Parsing Tools by providing additional help with converting JSON Data into Java Boxed-Primitive Types
This class builds on the J2EE Standard 'Glass-Fish' JSON Processor
There are several JSON Parsers available, and even more implementations for serializing and de-serializing data to/from JSON. The Glass Fish Tool is included in the J2EE, and is available on GitHub. That is the one used by the Java HTML JAR Library (See:javax.json.*)
Primary Classes Used:JsonArrayandJsonObject
This comment-note is intentionally repeated, verbatim, at the top of all Json Reader Classes in this package.
JSON to Java Binding:
JSON-Binding is the art of converting data that has been stored, saved or transmitted usingJava-Script Object Notationinto a Java Primitive or Object-Type.JSONcan arrive into Java-Program Memory from almost any source. If you are wondering why such a massive amount of "work" is necessary just to convert a Json Integer into Java Integer, the value added is the extraordinary amount of attention paid to user configuration, error checking, & exception messaging. Methods here don't require more than 1 or 2 lines of code, and guarantee that a thorough type checking is performed.
Unlike Java-Types which are checked by the Java-Compiler each-and-every time a programmer compiles his project, any guarantee that JSON-Type Data is pristine, uncorrupted, and in any kind of pre-agreed format may or may not be assured. The methods here are able to handle changes that might be made to an API (possibly from great distances away, and without the Software-Manager's consent). If an error could occur, configuration flags can be used to determine default error-recovery behaviors. If an exception does throw, the exception messages printed will contain multiple lines of detailed information.- Utilizes the Java-Standard
javax.json.*Package-Library, & its Glass-Fish Implementation - Handles the Transfer & Conversion of All Json-Type's into Java-Type's with just One Line of Code
- Provides all manner of User-Configurable Exception-Handling &
Error-Decision Management via Class
JFlag - Provides a Fine-Grained Suite of Exception-Classes, all with Consistent & Meaningful Error-Messages. Json Files can occasionally grow extremely large, and error messaging details make debugging easier
- Primary Helper-Classes for the (Experimental) Google-Chrome
Browser AutomationPackage
The goal ofTorello.JSONis to provide small, static helper methods in the same spirit asjava.util.Objectsandjava.util.Arrays: simple calls that keep JSON handling out of your application logic. Instead of repeating loops, type checks, null checks, and exception wiring at every call site, these methods centralize that work behind a consistent set of straight-forward “read value” operations.
Reads a single JsonString from a JsonArray or Object and parse it into a standard Java Boxed-Primitive
This method provides a narrowly focused bridge between structured JSON input and Java's boxed primitive types. It assumes the JSON value being read is aJsonString, and converts that textual representation into the requested Java boxed primitive using either standard Java parsing rules or a user-supplied parser. No implicit type coercion is performed beyond what the parser itself defines.
Two access patterns are supported: indexed lookup from aJsonArray, and key-based lookup from aJsonObject. In both cases, the method is designed to operate on a single, explicitly addressed JSON value rather than performing any form of structural traversal. This keeps the behavior predictable and allows calling code to make clear decisions about how missing, malformed, or unexpected values should be handled.
Optional error-control flags allow callers to tune exception behavior without duplicating parsing logic across multiple call sites. This separation of concerns makes the method suitable for both strict parsing scenarios—where errors should surface immediately—and permissive scenarios, where default values or suppressed exceptions are preferred. The result is a small, reusable parsing primitive that can be safely composed into higher-level JSON processing workflows.
Method Parameters
Parameter Explanation jaA JsonArraywhose element (atindex) is expected to contain aJsonStringvalue to be parsed into a Java Boxed-Primitive.
These methods are specifically for parsing strings (example: a JSON string like"123") into a Java boxed number/boolean.
If the element is not aJsonString, behavior is controlled byFLAGS(or an exception is thrown in “no-flags” method overloads).indexThe zero-based array index of the element being parsed from ja.
Some method overloads useiinstead ofindex— it is the same meaning: the array element position.
With “no-flags” overloads, out-of-bounds indexes throw the normal Java exception. WithFLAGSoverloads, flags may allow returning Java-nullordefaultValueinstead.joA JsonObjectwhose property value (namedpropertyName) is expected to contain aJsonStringto be parsed into a Java Boxed-Primitive.
If the property is missing, containsJsonValue.NULL, contains the wrong JSON type, or the parse fails, behavior is controlled byisOptional(for no-flags overloads) orFLAGS(for flags method overloads).propertyNameThe name of the JsonObjectproperty to retrieve fromjoand parse.
Missing-property behavior is controlled byisOptional(no-flags overloads) or byFLAGS(flags overloads).isOptionalUsed by the “no-flags” JsonObjectmethod overloads.
Whentrueandjodoes not containpropertyName, the method returns Java-null.
Whenfalseand the property is missing, an exception is thrown.
(For flags-based overloads, this parameter is not used;FLAGScontrols the “return null / return default / throw” decisions.)FLAGSA bit-mask of JFlagconstants that alters parse behavior and error-handling behavior.
WhenFLAGSis0, the “normal” behavior applies (exceptions are thrown for missing property, null, wrong JSON type, parse failure, etc.).
When flags are supplied, certain edge-cases may return Java-nullor returndefaultValueinstead of throwing. This includes (depending on flags) zero-length strings, parse failures, null values, wrong JSON types, and other cases handled by your flag set.See the “Default-Value Flags” / “Flags Master List” documentation for the authoritative per-flag meaning in classJFlagdefaultValueA Java <PRIMITIVE>fallback value that may be returned by theFLAGS-method overloads.
If the selected flags request a “default-value return” for some parse/edge-case, this is the value that will be returned.Note that the return type of the public methods is the corresponding Boxed Type (example:java.lang.Integer). The type ofdefaultValueis the matching primitive type. Java's "Auto-Boxing" and "Auto Un-Boxing" makes this easy.optionalParserA user-supplied parsing function: Function<String, BOXED_TYPE>.
If non-null, this function is used to convert theJsonStringcontent into the target Java boxed value (example: parse an integer from a string).
This is intended for cases where the default parsing logic is insufficient (special formats, custom numeric rules, locale-sensitive parsing, etc.), or where you simply want to override parsing behavior.
Some method overloads name this parameterparserrather thanoptionalParser; it is the same concept.
Single Character:
Note that this class simply doesn't support any methods for reading ajava.lang.Character. This is because their are just entirely too many possibilities, combinations & options for the appropriate "Default Behavior" when attempting to read a single character of data from any random JSON Data-Type.
Remember that the JSON Specification does not posses any "Single-JSON-Character" Data-Type. Creating some kind of Flag-Controlled Reader for a'char'that can capably decide what to do would be so overtly verbose, for something so simple, that it isn't worth the effort...- See Also:
JsonObject,JsonArray
Hi-Lited Source-Code:- View Here: Torello/JSON/ParseBoxedJSON.java
- Open New Browser-Tab: Torello/JSON/ParseBoxedJSON.java
File Size: 45,837 Bytes Line Count: 1,066 '\n' Characters Found
Stateless Class:This class neither contains any program-state, nor can it be instantiated. The@StaticFunctionalAnnotation may also be called 'The Spaghetti Report'.Static-Functionalclasses are, essentially, C-Styled Files, without any constructors or non-static member fields. It is a concept very similar to the Java-Bean's@StatelessAnnotation.
- 1 Constructor(s), 1 declared private, zero-argument constructor
- 32 Method(s), 32 declared static
- 0 Field(s)
- Utilizes the Java-Standard
-
-
Method Summary
No Control Flags: Retrieve a JsonStringfrom aJsonArrayand Parse into a Java Boxed-PrimitiveModifier and Type Method static BooleanparseBoolean(JsonArray ja, int i)static ByteparseByte(JsonArray ja, int index)static DoubleparseDouble(JsonArray ja, int index)static FloatparseFloat(JsonArray ja, int index)static IntegerparseInteger(JsonArray ja, int index)static LongparseLong(JsonArray ja, int index)static ShortparseShort(JsonArray ja, int index)No Control Flags: Retrieve a JsonStringfrom aJsonObjectand Parse into a Java Boxed-PrimitiveModifier and Type Method static BooleanparseBoolean(JsonObject jo, String propertyName, boolean isOptional)static ByteparseByte(JsonObject jo, String propertyName, boolean isOptional)static DoubleparseDouble(JsonObject jo, String propertyName, boolean isOptional)static FloatparseFloat(JsonObject jo, String propertyName, boolean isOptional)static IntegerparseInteger(JsonObject jo, String propertyName, boolean isOptional)static LongparseLong(JsonObject jo, String propertyName, boolean isOptional)static ShortparseShort(JsonObject jo, String propertyName, boolean isOptional)Using Error Control Flags: Retrieve a JsonStringfrom aJsonArrayand Parse into a Java Boxed-PrimitiveModifier and Type Method static BooleanparseBoolean(JsonArray ja, int index, int FLAGS, boolean defaultValue, Function<String,Boolean> optionalParser)static ByteparseByte(JsonArray ja, int index, int FLAGS, byte defaultValue, Function<String,Byte> optionalParser)static DoubleparseDouble(JsonArray ja, int index, int FLAGS, double defaultValue, Function<String,Double> optionalParser)static FloatparseFloat(JsonArray ja, int index, int FLAGS, float defaultValue, Function<String,Float> optionalParser)static IntegerparseInteger(JsonArray ja, int index, int FLAGS, int defaultValue, Function<String,Integer> optionalParser)static LongparseLong(JsonArray ja, int index, int FLAGS, long defaultValue, Function<String,Long> optionalParser)static ShortparseShort(JsonArray ja, int index, int FLAGS, short defaultValue, Function<String,Short> optionalParser)Using Error Control Flags: Retrieve a JsonStringfrom aJsonObjectand Parse into a Java Boxed-PrimitiveModifier and Type Method static BooleanparseBoolean(JsonObject jo, String propertyName, int FLAGS, boolean defaultValue, Function<String,Boolean> optionalParser)static ByteparseByte(JsonObject jo, String propertyName, int FLAGS, byte defaultValue, Function<String,Byte> optionalParser)static DoubleparseDouble(JsonObject jo, String propertyName, int FLAGS, double defaultValue, Function<String,Double> optionalParser)static FloatparseFloat(JsonObject jo, String propertyName, int FLAGS, float defaultValue, Function<String,Float> optionalParser)static IntegerparseInteger(JsonObject jo, String propertyName, int FLAGS, int defaultValue, Function<String,Integer> optionalParser)static LongparseLong(JsonObject jo, String propertyName, int FLAGS, long defaultValue, Function<String,Long> optionalParser)static ShortparseShort(JsonObject jo, String propertyName, int FLAGS, short defaultValue, Function<String,Short> optionalParser)Internal Use Only, Protected: General Purpose Parse Methods Modifier and Type Method protected static <T extends Number>
TPARSE(JsonArray ja, int index, int FLAGS, T defaultValue, Class<T> returnClass, Function<String,T> optionalParser, Function<BigDecimal,T> defaultParser1, Function<BigDecimal,T> defaultParser2)protected static <T extends Number>
TPARSE(JsonObject jo, String propertyName, int FLAGS, T defaultValue, Class<T> returnClass, Function<String,T> optionalParser, Function<BigDecimal,T> defaultParser1, Function<BigDecimal,T> defaultParser2)protected static <T extends Number>
TPARSE_NO_FLAGS(JsonArray ja, int index, Class<T> returnClass, Function<String,T> parser)protected static <T extends Number>
TPARSE_NO_FLAGS(JsonObject jo, String propertyName, boolean isOptional, Class<T> returnClass, Function<String,T> parser)
-
-
-
Method Detail
-
parseInteger
public static java.lang.Integer parseInteger (JsonArray ja, int index, int FLAGS, int defaultValue, java.util.function.Function<java.lang.String,java.lang.Integer> optionalParser)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed-IntegerAccepts: a JsonArray, along with an array index.Flags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Integer ( java.lang.Integer)- See Also:
PARSE(JsonArray, int, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( ja, index, FLAGS, defaultValue, Integer.class, optionalParser, BigDecimal::intValueExact, BigDecimal::intValue );
-
parseLong
public static java.lang.Long parseLong (JsonArray ja, int index, int FLAGS, long defaultValue, java.util.function.Function<java.lang.String,java.lang.Long> optionalParser)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed Long IntegerAccepts: a JsonArray, along with an array index.Flags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Long ( java.lang.Long)- See Also:
PARSE(JsonArray, int, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( ja, index, FLAGS, defaultValue, Long.class, optionalParser, BigDecimal::longValueExact, BigDecimal::longValue );
-
parseShort
public static java.lang.Short parseShort (JsonArray ja, int index, int FLAGS, short defaultValue, java.util.function.Function<java.lang.String,java.lang.Short> optionalParser)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed Short IntegerAccepts: a JsonArray, along with an array index.Flags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Integer ( java.lang.Integer)- See Also:
PARSE(JsonArray, int, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( ja, index, FLAGS, defaultValue, Short.class, optionalParser, BigDecimal::shortValueExact, BigDecimal::shortValue );
-
parseByte
public static java.lang.Byte parseByte (JsonArray ja, int index, int FLAGS, byte defaultValue, java.util.function.Function<java.lang.String,java.lang.Byte> optionalParser)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed-ByteAccepts: a JsonArray, along with an array index.Flags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Integer ( java.lang.Integer)- See Also:
PARSE(JsonArray, int, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( ja, index, FLAGS, defaultValue, Byte.class, optionalParser, BigDecimal::byteValueExact, BigDecimal::byteValue );
-
parseDouble
public static java.lang.Double parseDouble (JsonArray ja, int index, int FLAGS, double defaultValue, java.util.function.Function<java.lang.String,java.lang.Double> optionalParser)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed-DoubleAccepts: a JsonArray, along with an array index.Flags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Integer ( java.lang.Integer)- See Also:
PARSE(JsonArray, int, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( ja, index, FLAGS, defaultValue, Double.class, optionalParser, RJInternal::DOUBLE_WITH_CHECK, BigDecimal::doubleValue );
-
parseFloat
public static java.lang.Float parseFloat (JsonArray ja, int index, int FLAGS, float defaultValue, java.util.function.Function<java.lang.String,java.lang.Float> optionalParser)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed-FloatAccepts: a JsonArray, along with an array index.Flags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Integer ( java.lang.Integer)- See Also:
PARSE(JsonArray, int, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( ja, index, FLAGS, defaultValue, Float.class, optionalParser, RJInternal::FLOAT_WITH_CHECK, BigDecimal::floatValue );
-
parseInteger
public static java.lang.Integer parseInteger (JsonObject jo, java.lang.String propertyName, int FLAGS, int defaultValue, java.util.function.Function<java.lang.String,java.lang.Integer> optionalParser)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed-IntegerAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Integer ( java.lang.Integer)- See Also:
PARSE(JsonObject, String, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( jo, propertyName, FLAGS, defaultValue, Integer.class, optionalParser, BigDecimal::intValueExact, BigDecimal::intValue );
-
parseLong
public static java.lang.Long parseLong (JsonObject jo, java.lang.String propertyName, int FLAGS, long defaultValue, java.util.function.Function<java.lang.String,java.lang.Long> optionalParser)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed Long IntegerAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Long ( java.lang.Long)- See Also:
PARSE(JsonObject, String, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( jo, propertyName, FLAGS, defaultValue, Long.class, optionalParser, BigDecimal::longValueExact, BigDecimal::longValue );
-
parseShort
public static java.lang.Short parseShort (JsonObject jo, java.lang.String propertyName, int FLAGS, short defaultValue, java.util.function.Function<java.lang.String,java.lang.Short> optionalParser)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed Short IntegerAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Short ( java.lang.Short)- See Also:
PARSE(JsonObject, String, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( jo, propertyName, FLAGS, defaultValue, Short.class, optionalParser, BigDecimal::shortValueExact, BigDecimal::shortValue );
-
parseByte
public static java.lang.Byte parseByte (JsonObject jo, java.lang.String propertyName, int FLAGS, byte defaultValue, java.util.function.Function<java.lang.String,java.lang.Byte> optionalParser)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed-ByteAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Byte ( java.lang.Byte)- See Also:
PARSE(JsonObject, String, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( jo, propertyName, FLAGS, defaultValue, Byte.class, optionalParser, BigDecimal::byteValueExact, BigDecimal::byteValue );
-
parseDouble
public static java.lang.Double parseDouble (JsonObject jo, java.lang.String propertyName, int FLAGS, double defaultValue, java.util.function.Function<java.lang.String,java.lang.Double> optionalParser)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed-DoubleAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Double ( java.lang.Double)- See Also:
PARSE(JsonObject, String, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( jo, propertyName, FLAGS, defaultValue, Double.class, optionalParser, RJInternal::DOUBLE_WITH_CHECK, BigDecimal::doubleValue );
-
parseFloat
public static java.lang.Float parseFloat (JsonObject jo, java.lang.String propertyName, int FLAGS, float defaultValue, java.util.function.Function<java.lang.String,java.lang.Float> optionalParser)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed-FloatAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Float ( java.lang.Float)- See Also:
PARSE(JsonObject, String, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE( jo, propertyName, FLAGS, defaultValue, Float.class, optionalParser, RJInternal::FLOAT_WITH_CHECK, BigDecimal::floatValue );
-
parseInteger
public static java.lang.Integer parseInteger(JsonArray ja, int index)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed-IntegerAccepts: a JsonArray, along with an array index.Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Integer ( java.lang.Integer)- See Also:
PARSE(JsonObject, String, int, Number, Class, Function, Function, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(ja, index, Integer.class, Integer::parseInt);
-
parseLong
public static java.lang.Long parseLong(JsonArray ja, int index)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed Long IntegerAccepts: a JsonArray, along with an array index.Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Long ( java.lang.Long)- See Also:
PARSE_NO_FLAGS(JsonArray, int, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(ja, index, Long.class, Long::parseLong);
-
parseShort
public static java.lang.Short parseShort(JsonArray ja, int index)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed Short IntegerAccepts: a JsonArray, along with an array index.Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Short ( java.lang.Short)- See Also:
PARSE_NO_FLAGS(JsonArray, int, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(ja, index, Short.class, Short::parseShort);
-
parseByte
public static java.lang.Byte parseByte(JsonArray ja, int index)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed-ByteAccepts: a JsonArray, along with an array index.Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Byte ( java.lang.Byte)- See Also:
PARSE_NO_FLAGS(JsonArray, int, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(ja, index, Byte.class, Byte::parseByte);
-
parseDouble
public static java.lang.Double parseDouble(JsonArray ja, int index)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed-DoubleAccepts: a JsonArray, along with an array index.Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Double ( java.lang.Double)- See Also:
PARSE_NO_FLAGS(JsonArray, int, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(ja, index, Double.class, Double::parseDouble);
-
parseFloat
public static java.lang.Float parseFloat(JsonArray ja, int index)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed-FloatAccepts: a JsonArray, along with an array index.Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Float ( java.lang.Float)- See Also:
PARSE_NO_FLAGS(JsonArray, int, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(ja, index, Float.class, Float::parseFloat);
-
parseInteger
public static java.lang.Integer parseInteger(JsonObject jo, java.lang.String propertyName, boolean isOptional)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed-IntegerAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Integer ( java.lang.Integer)- See Also:
PARSE_NO_FLAGS(JsonObject, String, boolean, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(jo, propertyName, isOptional, Integer.class, Integer::parseInt);
-
parseLong
public static java.lang.Long parseLong(JsonObject jo, java.lang.String propertyName, boolean isOptional)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed Long IntegerAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Long ( java.lang.Long)- See Also:
PARSE_NO_FLAGS(JsonObject, String, boolean, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(jo, propertyName, isOptional, Long.class, Long::parseLong);
-
parseShort
public static java.lang.Short parseShort(JsonObject jo, java.lang.String propertyName, boolean isOptional)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed Short IntegerAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Short ( java.lang.Short)- See Also:
PARSE_NO_FLAGS(JsonObject, String, boolean, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(jo, propertyName, isOptional, Short.class, Short::parseShort);
-
parseByte
public static java.lang.Byte parseByte(JsonObject jo, java.lang.String propertyName, boolean isOptional)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed-ByteAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Byte ( java.lang.Byte)- See Also:
PARSE_NO_FLAGS(JsonObject, String, boolean, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(jo, propertyName, isOptional, Byte.class, Byte::parseByte);
-
parseDouble
public static java.lang.Double parseDouble(JsonObject jo, java.lang.String propertyName, boolean isOptional)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed-DoubleAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Double ( java.lang.Double)- See Also:
PARSE_NO_FLAGS(JsonObject, String, boolean, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(jo, propertyName, isOptional, Double.class, Double::parseDouble);
-
parseFloat
public static java.lang.Float parseFloat(JsonObject jo, java.lang.String propertyName, boolean isOptional)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed-FloatAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Float ( java.lang.Float)- See Also:
PARSE_NO_FLAGS(JsonObject, String, boolean, Class, Function)- Code:
- Exact Method Body:
return PARSE_NO_FLAGS(jo, propertyName, isOptional, Float.class, Float::parseFloat);
-
parseBoolean
public static java.lang.Boolean parseBoolean (JsonArray ja, int index, int FLAGS, boolean defaultValue, java.util.function.Function<java.lang.String,java.lang.Boolean> optionalParser)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed-BooleanAccepts: a JsonArray, along with an array index.Flags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Boolean ( java.lang.Boolean)- Code:
- Exact Method Body:
if (index >= ja.size()) return IOOBEX(ja, index, defaultValue, FLAGS); final JsonValue jv = ja.get(index); switch (jv.getValueType()) { case NULL: return JNAEX(ja, index, defaultValue, FLAGS, STRING, Boolean.class); case STRING: final String s = ((JsonString) jv).getString(); if (s.length() == 0) { if ((FLAGS & RETURN_NULL_ON_0LEN_STR) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_0LEN_STR) != 0) return defaultValue; if ((FLAGS & RETURN_NULL_ON_ANY_ALL) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_ANY_ALL) != 0) return defaultValue; } try { return (optionalParser != null) ? optionalParser.apply(s) : Boolean.parseBoolean(s.trim()); } catch (Exception e) { return JSPAEX(e, ja, index, defaultValue, FLAGS, jv, Boolean.class); } default: return JTAEX(ja, index, defaultValue, FLAGS, STRING, jv, Boolean.class); }
-
parseBoolean
public static java.lang.Boolean parseBoolean (JsonObject jo, java.lang.String propertyName, int FLAGS, boolean defaultValue, java.util.function.Function<java.lang.String,java.lang.Boolean> optionalParser)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed-IntegerAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Accepts Error-Control Flags; May be configured to suppress exceptions. Throws: Please review documentation for PARSEmethod, listed below.Returns: A Java Boxed Boolean ( java.lang.Boolean)- Code:
- Exact Method Body:
final JsonValue jv = jo.get(propertyName); if (jv == null) return JPMEX(jo, propertyName, defaultValue, FLAGS, STRING, Boolean.class); switch (jv.getValueType()) { case NULL: return JNOEX(jo, propertyName, defaultValue, FLAGS, STRING, Boolean.class); case STRING: final String s = ((JsonString) jv).getString(); if (s.length() == 0) { if ((FLAGS & RETURN_NULL_ON_0LEN_STR) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_0LEN_STR) != 0) return defaultValue; if ((FLAGS & RETURN_NULL_ON_ANY_ALL) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_ANY_ALL) != 0) return defaultValue; } try { return (optionalParser != null) ? optionalParser.apply(s) : Boolean.parseBoolean(s.trim()); } catch (Exception e) { return JSPOEX(e, jo, propertyName, defaultValue, FLAGS, jv, Boolean.class); } default: return JTOEX(jo, propertyName, defaultValue, FLAGS, STRING, jv, Boolean.class); }
-
parseBoolean
public static java.lang.Boolean parseBoolean(JsonArray ja, int i)
Retrieve a JsonString from a JsonArray index, and parse to a Boxed-BooleanAccepts: a JsonArray, along with an array index.Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Boolean ( java.lang.Boolean)- Code:
- Exact Method Body:
// Throws an IndexOutOfBoundsException final JsonValue jv = ja.get(i); switch (jv.getValueType()) { case NULL: return null; case STRING: try { return Boolean.parseBoolean(((JsonString) jv).getString()); } catch (Exception e) { throw new JsonStrParseArrException (e, ja, i, jv, Boolean.class); } default: throw new JsonTypeArrException(ja, i, STRING, jv, Boolean.class); }
-
parseBoolean
public static java.lang.Boolean parseBoolean(JsonObject jo, java.lang.String propertyName, boolean isOptional)
Retrieve a JsonString from a JsonObject property, and parse to a Boxed-IntegerAccepts: a JsonObject, along with property name, as ajava.lang.StringFlags: Does not accept user configuration flags. Instead, throws all default exceptions on error. Throws: Please review documentation for PARSE_NO_FLAGSmethod, listed below.Returns: A Java Boxed Boolean ( java.lang.Boolean)- Code:
- Exact Method Body:
final JsonValue jv = jo.get(propertyName); if (jv == null) { if (isOptional) return null; else throw new JsonPropMissingException(jo, propertyName, STRING, Boolean.class); } switch (jv.getValueType()) { case NULL: return null; case STRING: try { return Boolean.parseBoolean(((JsonString) jv).getString()); } catch (Exception e) { throw new JsonStrParseObjException(e, jo, propertyName, jv, Boolean.class); } default: throw new JsonTypeObjException(jo, propertyName, STRING, jv, Boolean.class); }
-
PARSE
protected static <T extends java.lang.Number> T PARSE (JsonArray ja, int index, int FLAGS, T defaultValue, java.lang.Class<T> returnClass, java.util.function.Function<java.lang.String,T> optionalParser, java.util.function.Function<java.math.BigDecimal,T> defaultParser1, java.util.function.Function<java.math.BigDecimal,T> defaultParser2)
Retrieve aJsonArrayelement containing aJsonString, and transform it to a Java Type, with either a user-provided parser, or the standard java parser for that class (passed as a parameter).- Type Parameters:
T- The type of the returned value- Parameters:
ja- Any instance ofJsonArrayindex- array-index containing theJsonStringto retrieve.FLAGS- The return-value / exception-throw flag constants defined inJFlagdefaultValue- User-provided default-value, only returned if flags are set.optionalParser- A validString -> 'T'parser. This parameter may be null.defaultParser1- DefaultString -> 'T'parser.defaultParser2-String -> 'T'parser, that will round on Arithmetic Exceptions- Returns:
- On success, this method returns the converted type.
- Throws:
JsonPropMissingException-'jo'doesn't have'propertyName', unless flags are set.JsonArithmeticArrException- after parse, conversion fails, and flags aren't setJsonStrParseArrException- parser-failure unless flags are setJsonNullArrException- property contains null, unless flags are setJsonTypeArrException- property doesn't containJsonString, unless flags are set.- See Also:
parseInteger(JsonArray, int, int, int, Function),parseLong(JsonArray, int, int, long, Function),parseShort(JsonArray, int, int, short, Function),parseByte(JsonArray, int, int, byte, Function),parseDouble(JsonArray, int, int, double, Function),parseFloat(JsonArray, int, int, float, Function),ReadNumberJSON.parse(JsonArray, int, int, Number, Function),RJInternal.IOOBEX(JsonArray, int, Object, int),RJInternal.JNAEX(JsonArray, int, Object, int, JsonValue.ValueType, Class),RJInternal.JSPAEX(Exception, JsonArray, int, Object, int, JsonValue, Class),RJInternal.JTAEX(JsonArray, int, Object, int, JsonValue.ValueType, JsonValue, Class)- Code:
- Exact Method Body:
// When TRUE, the index provided turned out to be outside of the bounds of the array. The // IndexOutOfBounds "handler" (the method called here) will check the FLAGS, and: // // 1) return the defaultValue (if Requested by 'FLAGS' for IOOBEX) // 2) return null (if Requested by 'FLAGS' for IOOBEX) // 3) throw IndexOutOfBoundsException // // NOTE: It is probably a "little less efficient" to turn this into a method call, // since there are all these parameters that have to be passed, but this is // trading "readability" (less head-aches) in exchange for efficiency. // // This point applies to all of the "Exception Flag Handlers" used here if (index >= ja.size()) return IOOBEX(ja, index, defaultValue, FLAGS); final JsonValue jv = ja.get(index); switch (jv.getValueType()) { // When a 'NULL' (Json-Null) JsonValue is present, the JsonNullArrException 'handler' // will do one of the following: // // 1) return the defaultValue (if Requested by 'FLAGS' for JNAEX) // 2) return null (if Requested by 'FLAGS' for JNAEX) // 3) throw JsonNullArrException case NULL: return JNAEX(ja, index, defaultValue, FLAGS, STRING, returnClass); case STRING: final String s = ((JsonString) jv).getString(); // NOTE: This isn't actually an "Exception Case", and if the user hasn't made // a request, the empty-string is passed to whatever parser is configured if (s.length() == 0) { if ((FLAGS & RETURN_NULL_ON_0LEN_STR) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_0LEN_STR) != 0) return defaultValue; if ((FLAGS & RETURN_NULL_ON_ANY_ALL) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_ANY_ALL) != 0) return defaultValue; } // Temp Variable, used in order not to invoke the BigDecimal contructor twice BigDecimal bd = null; try { // NOTE: 'bd' will not be null if "ArithmeticException" is thrown... // new BigDecimal throws "NumberFormatException" is thrown // optionalParser.apply can throw ArithmeticException return (optionalParser != null) ? optionalParser.apply(s) : defaultParser1.apply(bd = new BigDecimal(s.trim())); } // Because // // 1) A method for this code would only be invoked here, and... // 2) And because there would be 9 parameters to pass, // 3) the 'inline' version of "Flag Handler" is left here! // // NOTE: All four "JsonArithmetic Arr/Obj Exception" exception throws // are different for each of the 4 methods where they are used. catch (ArithmeticException ae) { if ((FLAGS & RETURN_NULL_ON_AEX) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_AEX) != 0) return defaultValue; if ((FLAGS & RETURN_JAPPROX_ON_AEX) != 0) return defaultParser2.apply(bd); if ((FLAGS & RETURN_NULL_ON_ANY_ALL) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_ANY_ALL) != 0) return defaultValue; throw new JsonArithmeticArrException(ae, ja, index, STRING, jv, returnClass); } // HANDLER STRIKES AGAIN! - but this time for "JsonStrParseArrException" // RETURNS: null, or defaultValue, (otherwise throws JsonStrParseArrException) catch (Exception e) { return JSPAEX(e, ja, index, defaultValue, FLAGS, jv, returnClass); } // The JsonValue at the specified array-index does not contain an JsonString. // The "JsonTypeArrException Handler" will do one of these: // // 1) return the defaultValue (if Requested by 'FLAGS' for JTAEX) // 2) return null (if Requested by 'FLAGS' for JTAEX) // 3) throw JsonTypeArrException default: return JTAEX(ja, index, defaultValue, FLAGS, STRING, jv, returnClass); }
-
PARSE
protected static <T extends java.lang.Number> T PARSE (JsonObject jo, java.lang.String propertyName, int FLAGS, T defaultValue, java.lang.Class<T> returnClass, java.util.function.Function<java.lang.String,T> optionalParser, java.util.function.Function<java.math.BigDecimal,T> defaultParser1, java.util.function.Function<java.math.BigDecimal,T> defaultParser2)
Retrieve aJsonObjectproperty containing aJsonString, and transform it to a Java Type, with either a user-provided parser, or the standard java parser for that class (passed as a parameter).- Type Parameters:
T- The type of the returned value.- Parameters:
jo- Any instance ofJsonObjectpropertyName- propertyName containing theJsonStringto retrieve.FLAGS- The return-value / exception-throw flag constants defined inJFlagdefaultValue- User-provided default-value, only returned if flags are set.optionalParser- A validString -> 'T'parser. This parameter may be null.defaultParser1- DefaultString -> 'T'parser.defaultParser2-String -> 'T'parser, that will round on Arithmetic Exceptions- Returns:
- On success, this method returns the converted type instance.
- Throws:
JsonPropMissingException-'jo'doesn't have'propertyName', unless flags are set.JsonArithmeticObjException- after parse, conversion fails, and flags aren't setJsonStrParseObjException- parser-failure unless flags are setJsonNullObjException- property contains null, unless flags are setJsonTypeObjException- property doesn't containJsonString, unless flags are set.- See Also:
parseInteger(JsonObject, String, int, int, Function),parseLong(JsonObject, String, int, long, Function),parseShort(JsonObject, String, int, short, Function),parseByte(JsonObject, String, int, byte, Function),parseDouble(JsonObject, String, int, double, Function),parseFloat(JsonObject, String, int, float, Function),ReadNumberJSON.parse(JsonObject, String, int, Number, Function),RJInternal.JPMEX(JsonObject, String, Object, int, JsonValue.ValueType, Class),RJInternal.JNOEX(JsonObject, String, Object, int, JsonValue.ValueType, Class),RJInternal.JSPOEX(Exception, JsonObject, String, Object, int, JsonValue, Class),RJInternal.JTOEX(JsonObject, String, Object, int, JsonValue.ValueType, JsonValue, Class)- Code:
- Exact Method Body:
final JsonValue jv = jo.get(propertyName); // When TRUE, the user-specified 'property' (named by 'propertyName') isn't actually one // of the listed properties inside the JsonObject. The JsonPropMissingException "handler" // (the method called here) will check the FLAGS, and: // // 1) return the defaultValue (if Requested by 'FLAGS' for JPMEX) // 2) return null (if Requested by 'FLAGS' for JPMEX) // 3) throw JsonPropMissingException // // NOTE: It is probably a "little less efficient" to turn this into a method call, // since there are all these parameters that have to be passed, but this is // trading "readability" (less head-aches) in exchange for efficiency. // // This point applies to all of the "Exception Flag Handlers" used here if (jv == null) return JPMEX(jo, propertyName, defaultValue, FLAGS, STRING, returnClass); switch (jv.getValueType()) { // When a 'NULL' (Json-Null) JsonValue is present, the JsonNullObjException 'handler' // will do one of the following: // // 1) return the defaultValue (if Requested by 'FLAGS' for JNOEX) // 2) return null (if Requested by 'FLAGS' for JNOEX) // 3) throw JsonNullArrException case NULL: return JNOEX(jo, propertyName, defaultValue, FLAGS, STRING, returnClass); case STRING: final String s = ((JsonString) jv).getString(); // NOTE: This isn't actually an "Exception Case", and if the user hasn't made // a request, the empty-string is passed to whatever parser is configured if (s.length() == 0) { if ((FLAGS & RETURN_NULL_ON_0LEN_STR) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_0LEN_STR) != 0) return defaultValue; if ((FLAGS & RETURN_NULL_ON_ANY_ALL) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_ANY_ALL) != 0) return defaultValue; } // Temp Variable, used in order not to invoke the BigDecimal contructor twice BigDecimal bd = null; try { // NOTE: 'bd' will not be null if "ArithmeticException" is thrown... // new BigDecimal throws "NumberFormatException" is thrown // parsoptionalParserer.apply can throw ArithmeticException return (optionalParser != null) ? optionalParser.apply(s) : defaultParser1.apply(bd = new BigDecimal(s.trim())); } // Because // // 1) A method for this code would only be invoked here, and... // 2) And because there would be 9 parameters to pass, // 3) the 'inline' version of "Flag Handler" is left here! // // NOTE: All four "JsonArithmetic Arr/Obj Exception" exception throws // are different for each of the 4 methods where they are used. catch (ArithmeticException ae) { if ((FLAGS & RETURN_NULL_ON_AEX) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_AEX) != 0) return defaultValue; if ((FLAGS & RETURN_JAPPROX_ON_AEX) != 0) return defaultParser2.apply(bd); if ((FLAGS & RETURN_NULL_ON_ANY_ALL) != 0) return null; if ((FLAGS & RETURN_DEFVAL_ON_ANY_ALL) != 0) return defaultValue; throw new JsonArithmeticObjException (ae, jo, propertyName, STRING, jv, returnClass); } // HANDLER STRIKES AGAIN! - but this time for "JsonStrParseObjException" // RETURNS: null, or defaultValue, (otherwise throws JsonStrParseObjException) catch (Exception e) { return JSPOEX(e, jo, propertyName, defaultValue, FLAGS, jv, returnClass); } // The JsonValue of 'propertyName' does not contain an JsonString. // The "JsonTypeObjException Handler" will do one of these: // // 1) return the defaultValue (if Requested by 'FLAGS' for JTOEX) // 2) return null (if Requested by 'FLAGS' for JTOEX) // 3) throw JsonTypeObjException default: return JTOEX(jo, propertyName, defaultValue, FLAGS, STRING, jv, returnClass); }
-
PARSE_NO_FLAGS
protected static <T extends java.lang.Number> T PARSE_NO_FLAGS (JsonArray ja, int index, java.lang.Class<T> returnClass, java.util.function.Function<java.lang.String,T> parser)
This is an internal helper method for retrieving an element from aJsonArray, and converting it to one of the standard Java Types.- Type Parameters:
T- Numeric Boxed-Type, as an instance ofjava.lang.Class- Parameters:
ja- Any instance ofJsonArrayindex- A valid index into'ja'returnClass- Internally specified Numeric Boxed-Type, used for Type Inferenceparser- Any function-pointer to a function that will transform / convert ajava.lang.Stringinto the specified type.This parameter may be null, and if it is, the standard Java parser is used.- Returns:
- The converted number, as an instance of Generic-Parameter
'T' - See Also:
parseInteger(JsonArray, int),parseLong(JsonArray, int),parseShort(JsonArray, int),parseByte(JsonArray, int),parseDouble(JsonArray, int),parseFloat(JsonArray, int)- Code:
- Exact Method Body:
// Throws an IndexOutOfBoundsException final JsonValue jv = ja.get(index); switch (jv.getValueType()) { case NULL: return null; case STRING: try { return parser.apply(((JsonString) jv).getString()); } catch (ArithmeticException ae) { throw new JsonArithmeticArrException(ae, ja, index, STRING, jv, returnClass);} catch (Exception e) { throw new JsonStrParseArrException (e, ja, index, jv, returnClass); } default: throw new JsonTypeArrException(ja, index, STRING, jv, returnClass); }
-
PARSE_NO_FLAGS
protected static <T extends java.lang.Number> T PARSE_NO_FLAGS (JsonObject jo, java.lang.String propertyName, boolean isOptional, java.lang.Class<T> returnClass, java.util.function.Function<java.lang.String,T> parser)
This is an internal helper method for retrieving a property from aJsonObject, and converting it to one of the standard Java Types.- Type Parameters:
T- Numeric Boxed-Type, as an instance ofjava.lang.Class- Parameters:
jo- Any instance ofJsonObjectpropertyName- Any property name contained by'jo'isOptional- WhenTRUEis passed, if'propertyName'is not actually listed in'jo'this method shall return Java-Null gracefully. WhenFALSEis passed, if'jo'does not have the specified property, aJsonPropMissingExceptionwill throw.
If'jo'actually has a property named'propertyName', then the value passed to this parameter is fully irrelevant.parser- Any function-pointer to a function that will transform / convert ajava.lang.Stringinto the specified type.This parameter may be null, and if it is, the standard Java parser is used.- Returns:
- The converted number, as an instance of Generic-Parameter
'T' - See Also:
parseInteger(JsonObject, String, boolean),parseLong(JsonObject, String, boolean),parseShort(JsonObject, String, boolean),parseByte(JsonObject, String, boolean),parseDouble(JsonObject, String, boolean),parseFloat(JsonObject, String, boolean)- Code:
- Exact Method Body:
final JsonValue jv = jo.get(propertyName); if (jv == null) { if (isOptional) return null; else throw new JsonPropMissingException(jo, propertyName, STRING, returnClass); } switch (jv.getValueType()) { case NULL: return null; case STRING: try { return parser.apply(((JsonString) jv).getString()); } catch (ArithmeticException ae) { throw new JsonArithmeticObjException (ae, jo, propertyName, STRING, jv, returnClass); } catch (Exception e) { throw new JsonStrParseObjException(e, jo, propertyName, jv, returnClass); } default: throw new JsonTypeObjException(jo, propertyName, STRING, jv, returnClass); }
-
-