Advertisement
Guest User

getAMLChecks

a guest
Jan 18th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. public static List<RFAmlEventManagement> getAMLChecks(JSONObject json) {
  2.         JSONArray checks = CanonicalMessageHelper.getProductService(json).getJSONArray(JSONConstants.JSON_CANONICAL_PARAM_SERVICE_CHECKS);
  3.  
  4.         ArrayList<RFAmlEventManagement> res = new ArrayList<RFAmlEventManagement>();
  5.         for (int i = 0; i < checks.length(); i++) {
  6.             try {
  7.                 res.add(new ObjectMapper().readValue(checks.getJSONObject(i)
  8.                         .toString(), RFAmlEventManagement.class));
  9.             } catch (JSONException | IOException e) {
  10.                 // Return empty or partial list
  11.                 break;
  12.             }
  13.         }
  14.  
  15.         return res;
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement