I'm trying to use the JSOHelper class to convert DSResponse data back to Java. The data coming back is a simple List of POJOs. I know I can get the items back as a record list, but is there an easy way to get the Java objects back? Here's what I'm trying to do:
Should I be converting to a list first then iterating? I'm not seeing how the JSOHelper.convertToJava() function is supposed to work.
Code:
DataSource.get("MyDataSource").fetchData(null, (dsResponse, o, dsRequest) -> { List<MyPojo> data = (List<MyPojo>) JSOHelper.converTtoJava(dsResponse.getDataAsObject()); }
Comment