Package Torello.JSON

Class RorPBoxedJSON


  • public class RorPBoxedJSON
    extends java.lang.Object
    Utilities for parsing & converting JsonString's or JsonNumber's 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: JsonArray and JsonObject


    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 using Java-Script Object Notation into a Java Primitive or Object-Type. JSON can 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 Automation Package

    The goal of Torello.JSON is to provide small, static helper methods in the same spirit as java.util.Objects and java.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 JSON value (either a number or a string) from a JsonArray or JsonObject and converts it into a corresponding Java boxed primitive type.

    This class exists to make reading numeric and boolean values from large, complex JSON structures both safer and easier. While JSON itself is loosely typed, Java is not, and bridging that gap reliably requires careful handling of value types, missing fields, and unexpected representations.
    In practice, JSON sources may freely alternate between numeric values and their string representations (for example 3 versus "3"), may omit optional fields entirely, or may return null in cases where a value is not mandatory. This class provides explicit, well-organized methods for handling each of these cases, ensuring that conversions are performed deliberately and that mistakes are detected immediately.

    Rather than attempting to infer or generate higher-level Java types, this class focuses on making low-level JSON access predictable and transparent. A significant amount of effort is dedicated to validating inputs and producing detailed error messages, so that when something goes wrong while traversing an unfamiliar or evolving JSON document, the cause of the failure is clear and actionable. The result is less repeated boilerplate, fewer silent failures, and greater confidence when consuming complex JSON data.



    Method Parameters

    Parameter Explanation
    ja A JsonArray whose element (at index) is being converted into a Java Boxed-Primitive value.

    In this class, the array-element may be either a JsonNumber or a JsonString.

    When the element is a JsonString, the method will invoke the matching ParseBoxedJSON method to parse the string contents.

    When the element is not a JsonString (including out-of-bounds), the method will invoke the matching ReadBoxedJSON method (expecting a JsonNumber or JsonValue.TRUE/FALSE).

    If the element is JsonValue.NULL, these methods may return Java null (depending on the specific overload and/or flags).
    index The zero-based array index of the element being read / parsed from ja.

    Some method overloads use i instead of index — it is the same meaning: the array element position.

    With “no-flags” overloads, out-of-bounds indexes throw the normal Java exception. With FLAGS overloads, flags may allow returning Java-null or defaultValue instead.
    jo A JsonObject whose property value (named propertyName) is being converted into a Java Boxed-Primitive value.

    In this class, the property value may be either a JsonNumber or a JsonString.

    When the property value is a JsonString, the method will invoke the matching ParseBoxedJSON method to parse the string contents.

    When the property value is missing (null) or not a JsonString, the method will invoke the matching ReadBoxedJSON method (expecting a JsonNumber or JsonValue.TRUE/FALSE).

    If the property exists but contains JsonValue.NULL, these methods may return Java null (depending on the specific overload and/or flags).
    propertyName The name of the JsonObject property to retrieve from jo.

    If the property is not present and you are using a “no-flags” overload, behavior is controlled by isOptional.

    If the property is not present and you are using a FLAGS overload, the flags may allow returning Java-null or a defaultValue.
    isOptional Used by the “no-flags” JsonObject method overloads.

    When true and jo does not contain propertyName, the method returns Java-null.

    When false and the property is missing, an exception is thrown.

    Note: this parameter is about the property missing case. If the property exists but is JsonValue.NULL, the methods may still return Java null (the classes intentionally allow null-returns).
    FLAGS A bit-mask of JFlag constants that alters failure/edge-case behavior.

    When FLAGS is 0, the “normal” behavior applies (exceptions are thrown for missing property, wrong JSON type, parse failure, arithmetic conversion failures, out-of-bounds index, etc.).

    When one or more flags are supplied, certain problems may be handled by returning Java-null or returning defaultValue instead of throwing.

    See the “Default-Value Flags” / “Flags Master List” documentation for the authoritative per-flag meaning in class JFlag
    defaultValue A Java <PRIMITIVE> fallback value that may be returned by the FLAGS-method overloads.

    If the selected flags request a “default-value return” for some failure/edge-case (missing property, null, wrong type, parse/arithmetic error, out-of-bounds, etc.), 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 of defaultValue is the matching primitive type. Java's "Auto-Boxing" and "Auto Un-Boxing" makes this easy.
    optionalParser A user-supplied parsing function: Function<String, BOXED_TYPE>.

    When the JSON value is a JsonString, this (optional) function may be used to convert the string content into the target Java boxed value.

    If optionalParser is null, the default parsing logic inside ParseBoxedJSON is used.

    optionalParser is only relevant when the JSON value being processed is a JsonString. When the value is a JsonNumber or JsonValue.TRUE/FALSE, the ReadBoxedJSON path is taken, and this parameter is ignored.


    Single Character:
    Note that this class simply doesn't support any methods for reading a java.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



    Stateless Class:
    This class neither contains any program-state, nor can it be instantiated. The @StaticFunctional Annotation may also be called 'The Spaghetti Report'. Static-Functional classes are, essentially, C-Styled Files, without any constructors or non-static member fields. It is a concept very similar to the Java-Bean's @Stateless Annotation.

    • 1 Constructor(s), 1 declared private, zero-argument constructor
    • 28 Method(s), 28 declared static
    • 0 Field(s)


    • Method Summary

       
      No Control Flags: Retrieve either a JsonNumber or JsonString from a JsonArray and Transform it to a Boxed-Numeric
      Modifier and Type Method
      static Byte getByte​(JsonArray ja, int i)
      static Double getDouble​(JsonArray ja, int i)
      static Float getFloat​(JsonArray ja, int i)
      static Integer getInteger​(JsonArray ja, int i)
      static Long getLong​(JsonArray ja, int i)
      static Short getShort​(JsonArray ja, int i)
       
      No Control Flags: Retrieve either a JsonNumber or JsonString from a JsonObject and Transform it to a Boxed-Numeric
      Modifier and Type Method
      static Byte getByte​(JsonObject jo, String propertyName, boolean isOptional)
      static Double getDouble​(JsonObject jo, String propertyName, boolean isOptional)
      static Float getFloat​(JsonObject jo, String propertyName, boolean isOptional)
      static Integer getInteger​(JsonObject jo, String propertyName, boolean isOptional)
      static Long getLong​(JsonObject jo, String propertyName, boolean isOptional)
      static Short getShort​(JsonObject jo, String propertyName, boolean isOptional)
       
      Using Error Control Flags: Retrieve either a JsonNumber or JsonString from a JsonArray and Transform it to a Boxed-Numeric
      Modifier and Type Method
      static Byte getByte​(JsonArray ja, int i, int FLAGS, byte defaultValue, Function<String,​Byte> optionalParser)
      static Double getDouble​(JsonArray ja, int i, int FLAGS, double defaultValue, Function<String,​Double> optionalParser)
      static Float getFloat​(JsonArray ja, int i, int FLAGS, float defaultValue, Function<String,​Float> optionalParser)
      static Integer getInteger​(JsonArray ja, int i, int FLAGS, int defaultValue, Function<String,​Integer> optionalParser)
      static Long getLong​(JsonArray ja, int i, int FLAGS, long defaultValue, Function<String,​Long> optionalParser)
      static Short getShort​(JsonArray ja, int i, int FLAGS, short defaultValue, Function<String,​Short> optionalParser)
       
      Using Error Control Flags: Retrieve either a JsonNumber or JsonString from a JsonObject and Transform it to a Boxed-Numeric
      Modifier and Type Method
      static Byte getByte​(JsonObject jo, String propertyName, int FLAGS, byte defaultValue, Function<String,​Byte> optionalParser)
      static Double getDouble​(JsonObject jo, String propertyName, int FLAGS, double defaultValue, Function<String,​Double> optionalParser)
      static Float getFloat​(JsonObject jo, String propertyName, int FLAGS, float defaultValue, Function<String,​Float> optionalParser)
      static Integer getInteger​(JsonObject jo, String propertyName, int FLAGS, int defaultValue, Function<String,​Integer> optionalParser)
      static Long getLong​(JsonObject jo, String propertyName, int FLAGS, long defaultValue, Function<String,​Long> optionalParser)
      static Short getShort​(JsonObject jo, String propertyName, int FLAGS, short defaultValue, Function<String,​Short> optionalParser)
       
      Boolean: Retrieve either JsonValue.TRUE , FALSE or a JsonString , and transform to Boxed-Boolean
      Modifier and Type Method
      static Boolean getBoolean​(JsonArray ja, int i)
      static Boolean getBoolean​(JsonArray ja, int i, int FLAGS, boolean defaultValue, Function<String,​Boolean> optionalParser)
      static Boolean getBoolean​(JsonObject jo, String propertyName, boolean isOptional)
      static Boolean getBoolean​(JsonObject jo, String propertyName, int FLAGS, boolean defaultValue, Function<String,​Boolean> optionalParser)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getLong

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Long getLong​
                    (JsonObject jo,
                     java.lang.String propertyName,
                     int FLAGS,
                     long defaultValue,
                     java.util.function.Function<java.lang.String,​java.lang.Long> optionalParser)
        
        Read either a JsonNumber or a JsonString from a JsonObject, and translate to a Boxed Long Integer
        Checks: Json Type of the specified JsonObject property, and dispatches based on type.
        Flags: Accepts all Error-Handler Flags; Suppresses exceptions when requested by the flag mask
        Returns: A Java Boxed Long
        See Also:
        ReadBoxedJSON.getLong(JsonObject, String, int, long), ParseBoxedJSON.parseLong(JsonObject, String, int, long, Function)
        Code:
        Exact Method Body:
         final JsonValue jv = jo.get(propertyName);
        
         return ((jv == null) || (jv.getValueType() != STRING))
             ? ReadBoxedJSON.getLong(jo, propertyName, FLAGS, defaultValue)
             : ParseBoxedJSON.parseLong(jo, propertyName, FLAGS, defaultValue, optionalParser);
        
      • getShort

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Short getShort​
                    (JsonObject jo,
                     java.lang.String propertyName,
                     int FLAGS,
                     short defaultValue,
                     java.util.function.Function<java.lang.String,​java.lang.Short> optionalParser)
        
        Read either a JsonNumber or a JsonString from a JsonObject, and translate to a Boxed Short Integer
        Checks: Json Type of the specified JsonObject property, and dispatches based on type.
        Flags: Accepts all Error-Handler Flags; Suppresses exceptions when requested by the flag mask
        Returns: A Java Boxed Short
        See Also:
        ReadBoxedJSON.getShort(JsonObject, String, int, short), ParseBoxedJSON.parseShort(JsonObject, String, int, short, Function)
        Code:
        Exact Method Body:
         final JsonValue jv = jo.get(propertyName);
        
         return ((jv == null) || (jv.getValueType() != STRING))
             ? ReadBoxedJSON.getShort(jo, propertyName, FLAGS, defaultValue)
             : ParseBoxedJSON.parseShort(jo, propertyName, FLAGS, defaultValue, optionalParser);
        
      • getByte

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Byte getByte​
                    (JsonObject jo,
                     java.lang.String propertyName,
                     int FLAGS,
                     byte defaultValue,
                     java.util.function.Function<java.lang.String,​java.lang.Byte> optionalParser)
        
        Read either a JsonNumber or a JsonString from a JsonObject, and translate to a Boxed Byte
        Checks: Json Type of the specified JsonObject property, and dispatches based on type.
        Flags: Accepts all Error-Handler Flags; Suppresses exceptions when requested by the flag mask
        Returns: A Java Boxed Byte
        See Also:
        ReadBoxedJSON.getByte(JsonObject, String, int, byte), ParseBoxedJSON.parseByte(JsonObject, String, int, byte, Function)
        Code:
        Exact Method Body:
         final JsonValue jv = jo.get(propertyName);
        
         return ((jv == null) || (jv.getValueType() != STRING))
             ? ReadBoxedJSON.getByte(jo, propertyName, FLAGS, defaultValue)
             : ParseBoxedJSON.parseByte(jo, propertyName, FLAGS, defaultValue, optionalParser);
        
      • getInteger

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Integer getInteger​(JsonArray ja,
                                                   int i)
        Read either a JsonNumber or a JsonString from a JsonArray, and translate to a Boxed Integer
        Checks: Json Type of the specified array index contents, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Integer
        See Also:
        ReadBoxedJSON.getInteger(JsonArray, int), ParseBoxedJSON.parseInteger(JsonArray, int)
        Code:
        Exact Method Body:
         return ((i >= ja.size()) || (ja.get(i).getValueType() != STRING))
             ? ReadBoxedJSON.getInteger(ja, i)
             : ParseBoxedJSON.parseInteger(ja, i);
        
      • getLong

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Long getLong​(JsonArray ja,
                                             int i)
        Read either a JsonNumber or a JsonString from a JsonArray, and translate to a Boxed Long Integer
        Checks: Json Type of the specified array index contents, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Long
        See Also:
        ReadBoxedJSON.getLong(JsonArray, int), ParseBoxedJSON.parseLong(JsonArray, int)
        Code:
        Exact Method Body:
         return ((i >= ja.size()) || (ja.get(i).getValueType() != STRING))
             ? ReadBoxedJSON.getLong(ja, i)
             : ParseBoxedJSON.parseLong(ja, i);
        
      • getShort

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Short getShort​(JsonArray ja,
                                               int i)
        Read either a JsonNumber or a JsonString from a JsonArray, and translate to a Boxed Short Integer
        Checks: Json Type of the specified array index contents, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Short
        See Also:
        ReadBoxedJSON.getShort(JsonArray, int), ParseBoxedJSON.parseShort(JsonArray, int)
        Code:
        Exact Method Body:
         return ((i >= ja.size()) || (ja.get(i).getValueType() != STRING))
             ? ReadBoxedJSON.getShort(ja, i)
             : ParseBoxedJSON.parseShort(ja, i);
        
      • getByte

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Byte getByte​(JsonArray ja,
                                             int i)
        Read either a JsonNumber or a JsonString from a JsonArray, and translate to a Boxed Byte
        Checks: Json Type of the specified array index contents, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Byte
        See Also:
        ReadBoxedJSON.getByte(JsonArray, int), ParseBoxedJSON.parseByte(JsonArray, int)
        Code:
        Exact Method Body:
         return ((i >= ja.size()) || (ja.get(i).getValueType() != STRING))
             ? ReadBoxedJSON.getByte(ja, i)
             : ParseBoxedJSON.parseByte(ja, i);
        
      • getDouble

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Double getDouble​(JsonArray ja,
                                                 int i)
        Read either a JsonNumber or a JsonString from a JsonArray, and translate to a Boxed Double
        Checks: Json Type of the specified array index contents, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Double
        See Also:
        ReadBoxedJSON.getDouble(JsonArray, int), ParseBoxedJSON.parseDouble(JsonArray, int)
        Code:
        Exact Method Body:
         return ((i >= ja.size()) || (ja.get(i).getValueType() != STRING))
             ? ReadBoxedJSON.getDouble(ja, i)
             : ParseBoxedJSON.parseDouble(ja, i);
        
      • getFloat

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Float getFloat​(JsonArray ja,
                                               int i)
        Read either a JsonNumber or a JsonString from a JsonArray, and translate to a Boxed Float
        Checks: Json Type of the specified array index contents, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Float
        See Also:
        ReadBoxedJSON.getFloat(JsonArray, int), ParseBoxedJSON.parseFloat(JsonArray, int)
        Code:
        Exact Method Body:
         return ((i >= ja.size()) || (ja.get(i).getValueType() != STRING))
             ? ReadBoxedJSON.getFloat(ja, i)
             : ParseBoxedJSON.parseFloat(ja, i);
        
      • getBoolean

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Boolean getBoolean​(JsonArray ja,
                                                   int i)
        Read either a JsonNumber or a JsonString from a JsonArray, and translate to a Boxed Boolean
        Checks: Json Type of the specified array index contents, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Boolean
        See Also:
        ReadBoxedJSON.getBoolean(JsonArray, int), ParseBoxedJSON.parseBoolean(JsonArray, int)
        Code:
        Exact Method Body:
         return ((i >= ja.size()) ||  (ja.get(i).getValueType() != STRING))
             ? ReadBoxedJSON.getBoolean(ja, i)
             : ParseBoxedJSON.parseBoolean(ja, i);
        
      • getInteger

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Integer getInteger​(JsonObject jo,
                                                   java.lang.String propertyName,
                                                   boolean isOptional)
        Read either a JsonNumber or a JsonString from a JsonObject, and translate to a Boxed Integer
        Checks: Json Type of the specified JsonObject property, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Integer
        See Also:
        ReadBoxedJSON.getInteger(JsonObject, String, boolean), ParseBoxedJSON.parseInteger(JsonObject, String, boolean)
        Code:
        Exact Method Body:
         final JsonValue jv = jo.get(propertyName);
        
         return ((jv == null) || (jv.getValueType() != STRING))
             ? ReadBoxedJSON.getInteger(jo, propertyName, isOptional)
             : ParseBoxedJSON.parseInteger(jo, propertyName, isOptional);
        
      • getLong

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Long getLong​(JsonObject jo,
                                             java.lang.String propertyName,
                                             boolean isOptional)
        Read either a JsonNumber or a JsonString from a JsonObject, and translate to a Boxed Long Integer
        Checks: Json Type of the specified JsonObject property, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Long
        See Also:
        ReadBoxedJSON.getLong(JsonObject, String, boolean), ParseBoxedJSON.parseLong(JsonObject, String, boolean)
        Code:
        Exact Method Body:
         final JsonValue jv = jo.get(propertyName);
        
         return ((jv == null) || (jv.getValueType() != STRING))
             ? ReadBoxedJSON.getLong(jo, propertyName, isOptional)
             : ParseBoxedJSON.parseLong(jo, propertyName, isOptional);
        
      • getShort

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Short getShort​(JsonObject jo,
                                               java.lang.String propertyName,
                                               boolean isOptional)
        Read either a JsonNumber or a JsonString from a JsonObject, and translate to a Boxed Short Integer
        Checks: Json Type of the specified JsonObject property, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Short
        See Also:
        ReadBoxedJSON.getShort(JsonObject, String, boolean), ParseBoxedJSON.parseShort(JsonObject, String, boolean)
        Code:
        Exact Method Body:
         final JsonValue jv = jo.get(propertyName);
        
         return ((jv == null) || (jv.getValueType() != STRING))
             ? ReadBoxedJSON.getShort(jo, propertyName, isOptional)
             : ParseBoxedJSON.parseShort(jo, propertyName, isOptional);
        
      • getByte

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Byte getByte​(JsonObject jo,
                                             java.lang.String propertyName,
                                             boolean isOptional)
        Read either a JsonNumber or a JsonString from a JsonObject, and translate to a Boxed Byte
        Checks: Json Type of the specified JsonObject property, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Byte
        See Also:
        ReadBoxedJSON.getByte(JsonObject, String, boolean), ParseBoxedJSON.parseByte(JsonObject, String, boolean)
        Code:
        Exact Method Body:
         final JsonValue jv = jo.get(propertyName);
        
         return ((jv == null) || (jv.getValueType() != STRING))
             ? ReadBoxedJSON.getByte(jo, propertyName, isOptional)
             : ParseBoxedJSON.parseByte(jo, propertyName, isOptional);
        
      • getDouble

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Double getDouble​(JsonObject jo,
                                                 java.lang.String propertyName,
                                                 boolean isOptional)
        Read either a JsonNumber or a JsonString from a JsonObject, and translate to a Boxed Double
        Checks: Json Type of the specified JsonObject property, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Double
        See Also:
        ReadBoxedJSON.getDouble(JsonObject, String, boolean), ParseBoxedJSON.parseDouble(JsonObject, String, boolean)
        Code:
        Exact Method Body:
         final JsonValue jv = jo.get(propertyName);
        
         return ((jv == null) || (jv.getValueType() != STRING))
             ? ReadBoxedJSON.getDouble(jo, propertyName, isOptional)
             : ParseBoxedJSON.parseDouble(jo, propertyName, isOptional);
        
      • getFloat

        🡅  🡇     🗕  🗗  🗖
        public static java.lang.Float getFloat​(JsonObject jo,
                                               java.lang.String propertyName,
                                               boolean isOptional)
        Read either a JsonNumber or a JsonString from a JsonObject, and translate to a Boxed Float
        Checks: Json Type of the specified JsonObject property, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Float
        See Also:
        ReadBoxedJSON.getFloat(JsonObject, String, boolean), ParseBoxedJSON.parseFloat(JsonObject, String, boolean)
        Code:
        Exact Method Body:
         final JsonValue jv = jo.get(propertyName);
        
         return ((jv == null) || (jv.getValueType() != STRING))
             ? ReadBoxedJSON.getFloat(jo, propertyName, isOptional)
             : ParseBoxedJSON.parseFloat(jo, propertyName, isOptional);
        
      • getBoolean

        🡅     🗕  🗗  🗖
        public static java.lang.Boolean getBoolean​(JsonObject jo,
                                                   java.lang.String propertyName,
                                                   boolean isOptional)
        Read either a JsonNumber or a JsonString from a JsonObject, and translate to a Boxed Boolean
        Checks: Json Type of the specified JsonObject property, and dispatches based on type.
        Flags: Does not accept user configuration flags. Instead, throws all default exceptions on error.
        Returns: A Java Boxed Boolean
        See Also:
        ReadBoxedJSON.getBoolean(JsonObject, String, boolean), ParseBoxedJSON.parseBoolean(JsonObject, String, boolean)
        Code:
        Exact Method Body:
         final JsonValue jv = jo.get(propertyName);
        
         return ((jv == null) || (jv.getValueType() != STRING))
             ? ReadBoxedJSON.getBoolean(jo, propertyName, isOptional)
             : ParseBoxedJSON.parseBoolean(jo, propertyName, isOptional);