List of usage examples for com.amazonaws.services.datapipeline.model Field Field
Field
From source file:com.shazam.dataengineering.pipelinebuilder.PipelineObject.java
License:Apache License
private HashSet<Field> parseFields(LinkedHashSet<Field> accumulator, Object json, String key) { if (json instanceof String) { accumulator.add(new Field().withKey(key).withStringValue((String) json)); } else if (json instanceof JSONArray) { JSONArray fieldArray = (JSONArray) json; for (Object field : fieldArray) { parseFields(accumulator, field, key); }/*from w w w . ja v a2 s . com*/ } else if (json instanceof JSONObject) { String refValue = (String) ((JSONObject) json).get("ref"); accumulator.add(new Field().withKey(key).withRefValue(refValue)); } return accumulator; }