Package Torello.JSON

Class RJArrIntoStream


  • public class RJArrIntoStream
    extends java.lang.Object
    RJArrIntoStream 🠞
    • RJArr - Read JsonArray
      This class is used for reading data directly from an already parsed JsonArray instance.

    • Into - Data that is extracted, is sent to a specific User-Provided Destination.

    • Stream - Data is sent to a Java-Stream.
    Utilities for parsing Json Array's and sending the parsed values into a Java Stream.

    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.


    Extract Elements from a JsonArray, and send them to a Stream of String's, Object's or Json-Type's

    This class provides just two methods for extracting String-Data or Object-Data from a JsonArray and placing them into standard Java-Streams.
    Each of the methods in this class, all declared 'static', accept a standard JsonArray as input, and will attempt to convert each of the elements of that array into the following output types. The provided table below explains which types are expected to be provided to the methods in this class, and what types will be placed in the returns Stream's after parsing and extracting the array elements.
    Array Element Type Returned / Emitted Type
    JsonObject Instance of User-Specified, Parameterized-Type <T>
    JsonString Instance of java.lang.String
    JsonObject -- same / no change --
    JsonArray -- same / no change --


    Optimize Loops:
    Methods in this class whose name ends with the letters 'Rec' are methods that produce what is known as a 'Settings Record', (see class SettingsRec<T, U>). Every one of the Json-Processing classes (in this Json Java-Package) that begin with the letters 'RJArr' are classes which iterate JsonArray's.

    In order to guarantee that there is a homogenous algorithm for processing these array indices, only a few Java 'for-loops' have actually been written. (These loops may be easily inspected by clicking on the 'Hi-Lited Source-Code' button inside of class ProcessJsonArray). In this class, in order to differentiate between a JsonArray which is to be converted into a Java int[]-Array, and one which is to be placed into a Java long[]-Array, a particular "Settings Record" is constructed (which "configures" the loop's body).

    If only one invocation of a method is needed, then using the method that ends with 'Arr' should be perfectly sufficient! If the methods in this class are going to be invoked from inside of a loop (or invoked many times), then it would be much wiser to, first, obtain an instance of the SettingsRec, and then invoke the Array-Processing code yourself. In this way, generating multiple short-lived, ephemeral, object instances (which are immediately discarded and collected by the Garbage-Collector) can be avoided.

    To do this is quite simple. Please review the documentation for any and all methods in this JSON Package whose name ends with 'Rec' - and look at the example code provided for how to use them. Most of those methods do include an example. Using a Loop Optimized method is a very simple, two step procedure as explained here:

    1. First, generate an instance of the SettingsRec class. Make sure to heed to Generic-Type Parameters returned by the Settings-Record Generator-Method you have called.
    2. Second, simply call the specified Json-Array Processing method from class ProcessJsonArray



    POJO De-Serialization:
    The methods that appear to de-serialize a JSON-Object into a standard Java-Object do not automatically generate a Java-Type based solely on the properties present within a JsonObject. Automatic type-creation (as exists in libraries such as 'Lombok') is not a feature offered by this package. These methods can reduce quite a bit of the work needed to convert Json into Java by offering methods which extact JsonValue's using just a single line of code.

    The methods in this class which return or emit a user-provided Parameterized-Type <T> require the user specify a means for constructing instances of 'T'. This class expects one of the two cases:

    • User-Provided Type <T> has a single argument constructor which accepts a JsonObject as a parameter. In this case, standard Java Reflection is used to retrieve and extract this constructor.

    • A Java Functional-Interface / Lambda be provided that accepts a JsonObject and returns an instance of User-Provided Type <T>. Building or generating an instance of <T> is acheived, simply, by invoking this function with the JsonObject which was extracted from the array.



    Method Parameters

    Parameter Explanation
    JsonArray ja This may be any parsed JsonArray whose contents are consistent with the expected return Stream-Type.
    <T> defaultValue The only requirement is this value must be either an instance of 'T', or an instance of a child / inheriting type of 'T'.

    'null' may also be provided as a default value.
    String defaultValue Any Java String, or null, will suffice
    JsonObject defautValue
    JsonArray defautValue
    For either of these, any instance may be provided. Null is also allowed. Frequently it might be convenient to use the singleton, empty, instances provided by the Glass-Fish Implementation:

    JsonValue.EMPTY_JSON_OBJECT
    JsonValue.EMPTY_JSON_ARRAY
    int FLAGS A Bit-Wise Flag-Mask that provides a means for configuring the Array-Processing Logic to properly handle several types of Error-Cases & potentatial, unexpected, array contents.

    A Flag-Mask of '0' requests that any Error-Situations which occur, should they crop up while processing the array, be handled by standard means - meaning by throwing one of the germaine Exception-Classes.
    Class<T> returnClass This may be any Java Class. It is required due to the limitations presented by Generic Erasure; this information is simply not available without providing a reference to this Class Object.
    java.util.function.Function
    <JsonObject, T> objBuilder
    When this parameter is present, it will be used to generate an instance of User-Specified Type 'T' by passing the JsonObject's encountered within the input array, to this user provided function.

    Lambda Signature:
    public <T> T apply(JsonObject jo)
    IntIntTFunc​ <JsonObject, T> objBuilder Similar to the above parameter, this object builder produces instances of User-Specified, Parameterized-Type 'T', but uses a @FunctionalInterface which accepts three parameters, intead of just the single JsonObject

    Lambda Signature:
    public <T> T apply(int jaIndex, int acceptorCount, JsonObject jo)

    The two "extra parameters" show above, are both primitive integers. The first one simply provides the JsonArray index where the object was found. The second 'int' contains the current iteration's "success count." These two numbers are usually identical; only cases where the user has specified a JFlag that requests the processor "Skip Entries on Failure" can These two integers take different values.
    See Also:
    Json, 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
    • 12 Method(s), 12 declared static
    • 0 Field(s)


    • Method Summary

       
      Read a list of String's from a Json-Array into a Java Stream<String>
      Modifier and Type Method
      static Stream<String> strArr​(JsonArray ja, String defaultValue, int FLAGS)
       
      Read a list of User-Defined Object's from a Json-Array into a Java Stream<T>
      Modifier and Type Method
      static <T> Stream<T> objArr​(JsonArray ja, T defaultValue, int FLAGS, Class<T> returnClass)
      static <T> Stream<T> objArr​(JsonArray ja, T defaultValue, int FLAGS, Function<JsonObject,​T> objBuilder, Class<T> returnClass)
      static <T> Stream<T> objArr​(JsonArray ja, T defaultValue, int FLAGS, IntIntTFunc<JsonObject,​T> objBuilder, Class<T> returnClass)
       
      Read a list of JsonObject's or JsonArray's into a Stream<JsonObject> or Stream<JsonArray>
      Modifier and Type Method
      static Stream<JsonArray> jaArr​(JsonArray ja, JsonArray defaultValue, int FLAGS)
      static Stream<JsonObject> joArr​(JsonArray ja, JsonObject defaultValue, int FLAGS)
       
      Loop Optimization: Generate a Reusable SettingsRec<String> Instance
      Modifier and Type Method
      static SettingsRec<String,
           ​Stream<String>>
      strRec​(String defaultValue, int FLAGS)
       
      Loop Optimization: Generate a Reusable SettingsRec<T> Instance
      Modifier and Type Method
      static <T> SettingsRec<T,
           ​Stream<T>>
      objRec​(T defaultValue, int FLAGS, Class<T> returnClass)
      static <T> SettingsRec<T,
           ​Stream<T>>
      objRec​(T defaultValue, int FLAGS, Function<JsonObject,​T> objBuilder, Class<T> returnClass)
      static <T> SettingsRec<T,
           ​Stream<T>>
      objRec​(T defaultValue, int FLAGS, IntIntTFunc<JsonObject,​T> objBuilder, Class<T> returnClass)
       
      Loop Optimization: Generate a Reusable SettingsRec<JsonObject> or SettingsRec<JsonArray> Instance
      Modifier and Type Method
      static SettingsRec<JsonArray,
           ​Stream<JsonArray>>
      jaRec​(JsonArray defaultValue, int FLAGS)
      static SettingsRec<JsonObject,
           ​Stream<JsonObject>>
      joRec​(JsonObject defaultValue, int FLAGS)
      • Methods inherited from class java.lang.Object

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

      • objArr

        🡇     🗕  🗗  🗖
        public static <T> java.util.stream.Stream<T> objArr​
                    (JsonArray ja,
                     T defaultValue,
                     int FLAGS,
                     java.lang.Class<T> returnClass)
        
        Generate a Java Stream of Object <T>
        Invokes: Method ProcessJsonArray.objToJava(JsonArray, SettingsRec)
        Passes: An Object-Retrieval Settings-Record.
        Requirements: Object-Class must be of Captured, Parameterized-Type, <T>
          Object-Class must implement a single-argument constructor which accepts a JsonObject
        See: Class JFlag for information about the 'FLAGS' parameter.
           
        Producing a YourTypeT[] Array from this Method is as Follows:

        Java Line of Code:
        // NOTE: Class 'YourTypeT' must have a 1-Argument Constructor which accepts a JsonObject
        
        YourTypeT[] arr = RJArrIntoStream
            .objArr(ja, null, 0, YourTypeT.class)
            .toArray(YourTypeT[]::new);
        
        See Also:
        ProcessJsonArray.objToJava(JsonArray, SettingsRec), objRec(Object, int, Class)
        Code:
        Exact Method Body:
         return ProcessJsonArray.objToJava(ja, objRec(defaultValue, FLAGS, returnClass));
        
      • objArr

        🡅  🡇     🗕  🗗  🗖
        public static <T> java.util.stream.Stream<T> objArr​
                    (JsonArray ja,
                     T defaultValue,
                     int FLAGS,
                     java.util.function.Function<JsonObject,​T> objBuilder,
                     java.lang.Class<T> returnClass)
        
        Generate a Java Stream of Object <T>, Use User-Provided Static-Builder
        Invokes: Method ProcessJsonArray.objToJava(JsonArray, SettingsRec)
        Passes: An Object-Retrieval Settings-Record.
        Requirements: Object-Class must be of Captured, Parameterized-Type, <T>
          The 'objBuilder' parameter into this method must be a function which accepts a JsonObject and returns an instance of Class 'T'
        See: Class JFlag for information about the 'FLAGS' parameter.
           
        Producing a YourTypeT[] Array from this Method is as Follows:

        Java Line of Code:
        Function<JsonObject, YourTypeT> staticBuilder =
            (JsonObject jo) -> parseMyJsonObject(jo);
        
        YourTypeT[] arr = RJArrIntoStream
                .objArr(ja, null, 0, staticBuilder, YourTypeT.class)
                .toArray(YourTypeT[]::new);
        
        See Also:
        ProcessJsonArray.objToJava(JsonArray, SettingsRec), objRec(Object, int, Function, Class)
        Code:
        Exact Method Body:
         return ProcessJsonArray.objToJava(ja, objRec(defaultValue, FLAGS, objBuilder, returnClass));
        
      • objArr

        🡅  🡇     🗕  🗗  🗖
        public static <T> java.util.stream.Stream<T> objArr​
                    (JsonArray ja,
                     T defaultValue,
                     int FLAGS,
                     IntIntTFunc<JsonObject,​T> objBuilder,
                     java.lang.Class<T> returnClass)
        
        Generate a Java Stream of Object <T>, Use User-Provided Static-Builder
        Invokes: Method ProcessJsonArray.objToJava(JsonArray, SettingsRec)
        Passes: An Object-Retrieval Settings-Record.
        Requirements: Object-Class must be of Captured, Parameterized-Type, <T>
          The 'objBuilder' parameter into this method must be a function which accepts a JsonObject along with two integers (Json Array-Index & Output Object-Count), and returns an instance of Class 'T'
        See: Class JFlag for information about the 'FLAGS' parameter.
           
        Producing a YourTypeT[] Array from this Method is as Follows:

        Java Line of Code:
        IntIntTFunction<JsonObject, YourTypeT> staticBuilder =
            (int jsonArrayIndex, int acceptCount, JsonObject jo) ->
                parseMyJsonObject(jsonArrayIndex, acceptCount, jo);
        
        YourTypeT[] arr = RJArrIntoStream
                .objArr(ja, null, 0, staticBuilder, YourTypeT.class)
                .toArray(YourTypeT[]::new);
        
        See Also:
        ProcessJsonArray.objToJava(JsonArray, SettingsRec), objRec(Object, int, IntIntTFunc, Class)
        Code:
        Exact Method Body:
         return ProcessJsonArray.objToJava
             (ja, objRec(defaultValue, FLAGS, objBuilder, returnClass));
        
      • objRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static <T> SettingsRec<T,​java.util.stream.Stream<T>> objRec​
                    (T defaultValue,
                     int FLAGS,
                     java.lang.Class<T> returnClass)
        
        Generate a Java Settings-Record for producing Stream<T>
        Generates: An Object-Retrieval Settings-Record.
          Object must be of Captured, Parameterized-Type, <T>
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.objToJava(JsonArray, SettingsRec)
        Requirements: User-Specified Class must implement a single-argument constructor which accepts a JsonObject
        See: Class JFlag for information about the 'FLAGS' parameter.
           
        Producing an Object-Stream (Stream<YourTypeT>> by using this record is a two step process.
        It may be acheived as Follows:

        Example:
        SettingsRec<YouTypeT, Stream<YourTypeT>> rec =
            RJArrIntoStream.objRec(null, 0, YourTypeT.class);
        
        // Reuse the same record in each loop-iteration: only 1 Constructor-Invocation
        for (JsonArray ja : someJsonArraySource) ProcessJsonArray
            .objToJava(ja, rec)             // Returns a Stream<YourTypeT>
            .forEach(System.out::println);  // Prints out each number in the stream
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<T, Stream<T>>
             (defaultValue, FLAGS, null, EXTENDED_TYPES.FROM_CTOR(returnClass))
             .streams();
        
      • objRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static <T> SettingsRec<T,​java.util.stream.Stream<T>> objRec​
                    (T defaultValue,
                     int FLAGS,
                     java.util.function.Function<JsonObject,​T> objBuilder,
                     java.lang.Class<T> returnClass)
        
        Generate a Java Settings-Record for producing Stream<T>
        Generates: An Object-Retrieval Settings-Record.
          Object must be of Captured, Parameterized-Type, <T>
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.objToJava(JsonArray, SettingsRec)
        Requirements: An 'objBuilder' parameter into this method must be a function which accepts a JsonObject and returns an instance of Object 'T'
        See: Class JFlag for information about the 'FLAGS' parameter.
           
        Producing an Object-Stream (Stream<YourTypeT>> by using this record is a two step process.
        It may be acheived as Follows:

        Example:
        SettingsRec<YouTypeT, Stream<YourTypeT>> rec =
            RJArrIntoStream.objRec(null, 0, YourTypeT.class);
        
        // Reuse the same record in each loop-iteration: only 1 Constructor-Invocation
        for (JsonArray ja : someJsonArraySource) ProcessJsonArray
            .objToJava(ja, rec)             // Returns a Stream<YourTypeT>
            .forEach(System.out::println);  // Prints out each number in the stream
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<T, Stream<T>>
             (defaultValue, FLAGS, null, EXTENDED_TYPES.ONE_ARG_FUNC(objBuilder, returnClass))
             .streams();
        
      • objRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static <T> SettingsRec<T,​java.util.stream.Stream<T>> objRec​
                    (T defaultValue,
                     int FLAGS,
                     IntIntTFunc<JsonObject,​T> objBuilder,
                     java.lang.Class<T> returnClass)
        
        Generate a Java Settings-Record for producing Stream<T>
        Generates: An Object-Retrieval Settings-Record.
          Object must be of Captured, Parameterized-Type, <T>
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.objToJava(JsonArray, SettingsRec)
        Requirements:  'objBuilder' parameter into this method must be a function which accepts a JsonObject and returns an instance of Object 'T'
        See: Class JFlag for information about the 'FLAGS' parameter.
           
        Producing an Object-Stream (Stream<YourTypeT>> by using this record is a two step process.
        It may be acheived as Follows:

        Example:
        SettingsRec<YouTypeT, Stream<YourTypeT>> rec =
            RJArrIntoStream.objRec(null, 0, YourTypeT.class);
        
        // Reuse the same record in each loop-iteration: only 1 Constructor-Invocation
        for (JsonArray ja : someJsonArraySource) ProcessJsonArray
            .objToJava(ja, rec)             // Returns a Stream<YourTypeT>
            .forEach(System.out::println);  // Prints out each number in the stream
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<T, Stream<T>>
             (defaultValue, FLAGS, null, EXTENDED_TYPES.THREE_ARG_FUNC(objBuilder, returnClass))
             .streams();
        
      • strRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<java.lang.String,​java.util.stream.Stream<java.lang.String>> strRec​
                    (java.lang.String defaultValue,
                     int FLAGS)
        
        Generate a Java Settings-Record for producing Stream<String>
        Generates: A String-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.strToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
           
        Producing a String-Stream by using this record is a two step process.
        It may be acheived as Follows:

        Example:
        SettingsRec<String, Stream<String>> rec =
            RJArrIntoStream.strRec("", 0);
        
        // Reuse the same record in each loop-iteration: only 1 Constructor-Invocation
        for (JsonArray ja : someJsonArraySource) ProcessJsonArray
            .strToJava(ja, rec)             // Returns a Stream<String>
            .forEach(System.out::println);  // Prints out each String in the stream
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<String, Stream<String>>
             (defaultValue, FLAGS, null, BASIC_TYPES.STRING_REC())
             .streams();
        
      • joRec

        🡅  🡇         External-Java:      🗕  🗗  🗖
        public static SettingsRec<JsonObject,​java.util.stream.Stream<JsonObject>> joRec​
                    (JsonObject defaultValue,
                     int FLAGS)
        
        Generate a Java Settings-Record for producing Stream<javax.json.JsonObject>
        Generates: A JsonObject-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.joToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
           
        Producing a JsonObject-Stream by using this record is a two step process.
        It may be acheived as Follows:

        Example:
        // Create the reusable SettingsRec instance:
        final SettingsRec<javax.json.JsonObject, Stream<javax.json.JsonObject>> rec =
            RJArrIntoStream.joRec(javax.json.Jsonvalue.EMPTY_JSON_OBJECT, JFlag.RETURN_DEFVAL_ON_ANY_ALL);
        
        
        // Reuse the same record in each loop-iteration: only 1 Constructor-Invocation
        // Iterate a list of JsonArray instances (each containing a list of JsonObject's)
        
        for (JsonArray ja : someJsonArraySource) ProcessJsonArray
            .joToJava(ja, rec)              // Returns a Stream<JsonObject>
            .forEach(System.out::println);  // Prints out each JsonObject in the stream
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<JsonObject, Stream<JsonObject>>
             (defaultValue, FLAGS, null, BASIC_TYPES.JSON_OBJECT_REC())
             .streams();
        
      • jaRec

        🡅         External-Java:      🗕  🗗  🗖
        public static SettingsRec<JsonArray,​java.util.stream.Stream<JsonArray>> jaRec​
                    (JsonArray defaultValue,
                     int FLAGS)
        
        Generate a Java Settings-Record for producing Stream<javax.json.JsonArray>
        Generates: A JsonArray-Retrieval Settings-Record.
        Used For: The record produced from this method may be used as a parameter to invoke:
          Method ProcessJsonArray.jaToJava(JsonArray, SettingsRec)
        See: Class JFlag for information about the 'FLAGS' parameter.
        Value: Generating the internally used SettingsRec Object-Instance yourself makes code more efficient. In this way, the object is constructed only once, rather than each time a new array is to be processed.
           
        Producing a JsonArray-Stream by using this record is a two step process.
        It may be acheived as Follows:

        Example:
        // Create the reusable SettingsRec instance:
        final SettingsRec<javax.json.JsonArray, Stream<javax.json.JsonArray>> rec =
            RJArrIntoStream.jaRec(javax.json.Jsonvalue.EMPTY_JSON_ARRAY, JFlag.RETURN_DEFVAL_ON_ANY_ALL);
        
        
        // Reuse the same record in each loop-iteration: only 1 Constructor-Invocation
        // Iterate a list of JsonArray instances (each containing, themselves, a list of JsonArray's)
        
        for (JsonArray ja : someJsonArraySource) ProcessJsonArray
            .jaToJava(ja, rec)              // Returns a Stream<JsonArray>
            .forEach(System.out::println);  // Prints out each JsonArray in the stream
        
        Code:
        Exact Method Body:
         return new SETTINGS_REC_BUILDER<JsonArray, Stream<JsonArray>>
             (defaultValue, FLAGS, null, BASIC_TYPES.JSON_ARRAY_REC())
             .streams();