In my requirement I am reading JsonArray (javax.json.JsonArray) from the local file like below:
JsonReader reader = Json.createReader(new FileReader(path));
JsonArray regAttribArr = reader.readObject().getJsonObject("Entries")
.getJsonArray("Attributes");
reader.close();
After that while removing the element from that array like below,
JsonValue tempjv = regAttribArr.get(0);
regAttribArr.remove(tempjv);
it is throwing UnsupportedOperationException as JsonArray class is unmodifiable list.
Is there any alternate way to delete the element from this javax.json.JsonArray object ?