}
JSONObject jPrincipals = jStatement.getJSONObject(JsonDocumentFields.PRINCIPAL);
String[] fields = JSONObject.getNames(jPrincipals);
for (String field : fields) {
String serviceId = jPrincipals.optString(field);
if (serviceId != null && serviceId.length() > 0) {
if (field.equalsIgnoreCase("AWS")) {
statement.getPrincipals().add(new Principal(serviceId));
} else if (field.equalsIgnoreCase("Service")) {
statement.getPrincipals().add(new Principal(Services.fromString(serviceId)));