jsonGenerator.writeStringField(ID, principal.getId());
jsonGenerator.writeArrayFieldStart(ATTRIBUTES);
final Map<String, Object> attributes = principal.getAttributes();
for (final String key : attributes.keySet()) {
jsonGenerator.writeStartObject();
jsonGenerator.writeObjectField(key, attributes.get(key));
jsonGenerator.writeEndObject();
}
jsonGenerator.writeEndArray();
jsonGenerator.writeEndObject();
return null;