I did a test with a REST service I create mimicking the output of your expected JSON string and I found no problem in the OD REST operation. I also print out the JSON string in my custom OD code
public void servletImplementation(com.avaya.sce.runtimecommon.SCESession mySession) {
Object objJson = mySession.getVariableField(IProjectVariables.RSRET).getObjectValue();
JSONObject json = (JSONObject)objJson;
try {
JSONArray json2 = (JSONArray)json.get("policyBasic");
System.out.println(json2);
JSONObject json3 = (JSONObject)json2.get(0);
System.out.println(json3.get("clients"));
} catch (JSONException e) {
e.printStackTrace();
}
13/02/2019 11:19:59:932 INFO - 715F7F5A3778F86510997148164CCB33:/TestRest : Starting REST web service operation [rstest]
13/02/2019 11:20:00:011 DEBUG - 715F7F5A3778F86510997148164CCB33:/TestRest : Web Service Request ->
http://localhost:8082/MyWebProject/MyServlet
13/02/2019 11:20:00:041 DEBUG - 715F7F5A3778F86510997148164CCB33:/TestRest : Storing [{"message":null,"policyBasic":[{"policyNo":"12291965 ","companyCode":"101","activeWorkflowSgnl":"Y","cssdTrackNo":null,"dataSrcCode":"CYBR","issueDate":"1990-10-08","policyStatusChngDate":"1990-10-08","policyStatusCode":"A ","clients":[{"passwdTxt":"PassJuly","birthDate":"1977-02-01","clientId":"","odsClientId":"1821757","nameType":"N","corpName":"","clientSeqNo":"01","clientSsnTaxId":"111116996","companyCode":"101","cssRegisteredSgnl":null,"emailAddrTxt":"monica.perez@test3.com ","firstName":"MONICA","invalidEmailSgnl":null,"lastName":"PEREZ","lastUpdtSrcName":"CLLOAD","lastUpdtTmstmp":"2019-02-08 19:53:09.280119","middleName":"","namePrfx":"","nameSufx":"","otherPhoneNo":"4096217713","paperlessOptionSgnl":null,"personalIdNo":0,"policyNo":"12291965 ","primaryPhoneNo":"4096920113","residentialStateCode":"TX","roleCode":"OW"}]}]}] to: rsret
13/02/2019 11:20:00:041 DEBUG - 715F7F5A3778F86510997148164CCB33:/TestRest : Web Service Reply <- {"message":null,"policyBasic":[{"policyNo":"12291965 ","companyCode":"101","activeWorkflowSgnl":"Y","cssdTrackNo":null,"dataSrcCode":"CYBR","issueDate":"1990-10-08","policyStatusChngDate":"1990-10-08","policyStatusCode":"A ","clients":[{"passwdTxt":"PassJuly","birthDate":"1977-02-01","clientId":"","odsClientId":"1821757","nameType":"N","corpName":"","clientSeqNo":"01","clientSsnTaxId":"111116996","companyCode":"101","cssRegisteredSgnl":null,"emailAddrTxt":"monica.perez@test3.com ","firstName":"MONICA","invalidEmailSgnl":null,"lastName":"PEREZ","lastUpdtSrcName":"CLLOAD","lastUpdtTmstmp":"2019-02-08 19:53:09.280119","middleName":"","namePrfx":"","nameSufx":"","otherPhoneNo":"4096217713","paperlessOptionSgnl":null,"personalIdNo":0,"policyNo":"12291965 ","primaryPhoneNo":"4096920113","residentialStateCode":"TX","roleCode":"OW"}]}]}
13/02/2019 11:20:00:043 INFO - 715F7F5A3778F86510997148164CCB33:/TestRest : Using SCESession 715F7F5A3778F86510997148164CCB33:/TestRest servlet : ParseJson
[{"policyNo":"12291965 ","companyCode":"101","activeWorkflowSgnl":"Y","cssdTrackNo":null,"dataSrcCode":"CYBR","issueDate":"1990-10-08","policyStatusChngDate":"1990-10-08","policyStatusCode":"A ","clients":[{"passwdTxt":"PassJuly","birthDate":"1977-02-01","clientId":"","odsClientId":"1821757","nameType":"N","corpName":"","clientSeqNo":"01","clientSsnTaxId":"111116996","companyCode":"101","cssRegisteredSgnl":null,"emailAddrTxt":"monica.perez@test3.com ","firstName":"MONICA","invalidEmailSgnl":null,"lastName":"PEREZ","lastUpdtSrcName":"CLLOAD","lastUpdtTmstmp":"2019-02-08 19:53:09.280119","middleName":"","namePrfx":"","nameSufx":"","otherPhoneNo":"4096217713","paperlessOptionSgnl":null,"personalIdNo":0,"policyNo":"12291965 ","primaryPhoneNo":"4096920113","residentialStateCode":"TX","roleCode":"OW"}]}]
[{"passwdTxt":"PassJuly","birthDate":"1977-02-01","clientId":"","odsClientId":"1821757","nameType":"N","corpName":"","clientSeqNo":"01","clientSsnTaxId":"111116996","companyCode":"101","cssRegisteredSgnl":null,"emailAddrTxt":"monica.perez@test3.com ","firstName":"MONICA","invalidEmailSgnl":null,"lastName":"PEREZ","lastUpdtSrcName":"CLLOAD","lastUpdtTmstmp":"2019-02-08 19:53:09.280119","middleName":"","namePrfx":"","nameSufx":"","otherPhoneNo":"4096217713","paperlessOptionSgnl":null,"personalIdNo":0,"policyNo":"12291965 ","primaryPhoneNo":"4096920113","residentialStateCode":"TX","roleCode":"OW"}]