class JavaxJson {

    @SuppressWarnings("WeakerAccess")
    public static <R> List<R> parseFromArray(final @NotNull JsonArray jsonArray,
                                             final @NotNull Fun.ThrowingFunction<String, R> parser,
                                             final @Nullable BiConsumer<String, Exception> errorConsumer) {
        return jsonArray.stream()
                .map(JSON_VALUE_STRING)
                .flatMap(Fun.composeTry1(Stream::of, Stream::empty, parser, errorConsumer))
                .collect(Collectors.toList());
    }

    private  JavaxJson();

}