I am calling an Autodesk API GET {urn}/metadata/{guid}/properties
this API returns {"result":"success"} as JSON String for the first time.
If I call the same API repeatedly using a while loop it returns the properties of a flat list of objects from an object tree of 64MB of data.
To verify the data I received from API, below code is what I have written
boolean hasResult = false;
boolean hasData = false;
String result
do {
result = api call
JSONObject jo = new JSONObject(result);
hasResult = jo.has("result");
hasData = jo.has("data");
if (hasData) {
break;
}
} while (hasResult);
This process leads to running out of memory java heap space issue.