Package org.keycloak.utils
Class JsonUtils
java.lang.Object
org.keycloak.utils.JsonUtils
Utility methods for manipulating JSON objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectgetJsonValue(com.fasterxml.jackson.databind.JsonNode node, String claim) Returns the value corresponding to the givenclaim.static booleanDetermines if the givenclaimcontains paths.splitClaimPath(String claim) Splits the givenclaiminto separate paths if the value contains separators as perCLAIM_COMPONENT.
-
Constructor Details
-
JsonUtils
public JsonUtils()
-
-
Method Details
-
splitClaimPath
Splits the givenclaiminto separate paths if the value contains separators as perCLAIM_COMPONENT.- Parameters:
claim- the claim- Returns:
- a list with the paths
-
hasPath
Determines if the givenclaimcontains paths.- Parameters:
claim- the claim- Returns:
trueif theclaimcontains paths. Otherwise, false.
-
getJsonValue
Returns the value corresponding to the given
claim.- Parameters:
node- the JSON nodeclaim- the claim- Returns:
- the value
-