if (json != null) {
ArrayNode array = (ArrayNode) json.get("response");
JsonNode userNode = array.get(0);
profile.setId(JsonHelper.get(userNode, "uid"));
for (final String attribute : OAuthAttributesDefinitions.vkDefinition.getAllAttributes()) {
profile.addAttribute(attribute, JsonHelper.get(userNode, attribute));
}
}
return profile;
}