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