0
import javax.json.Json;
import javax.json.JsonArray;
import javax.json.JsonObject;
import javax.json.JsonValue;
// código
JsonObject object = Json.createObjectBuilder().build();
JsonArray array = Json.createArrayBuilder().build();
JsonArray tweets = getTweets();
for (JsonValue tweet : tweets) {
object = (JsonObject) tweet;
array.add(object);
}
return array;
I take this exception:
java.lang.UnsupportedOperationException
I also took a look at java documentation but it didn’t help...
Thank you, myself, yesterday, I had already done it here on the project and I had forgotten. I found the answer right now, between the classes of my code.Anyway now this clarified.. That’s what gives little sleep... Lapses of memory
– Pena Pintada