I'd like to split a JsonArray from the package javax.json and I can't find a convenient method that does the job. I looked through the documentation and I can only think of iterating over the JsonArray and adding the items manually using the JsonArrayBuilder.
Is there a more convenient way to split the array?
Please note that I can't use another package (such as google.gson).
Thanks in advance.
edit: I have a JsonArray of size N and I'd like to split it by indexes from and to and save the result as a JsonArray.
something like this:
JsonArray array1 = getJsonArrayOfSize(10);
JsonArray array2 = array1.split(2,5);
JsonArrayto List and then split each items inList.