Package org.iam.policy.grammer
Class PrincipalDeserializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider
public class PrincipalDeserializer
extends com.fasterxml.jackson.databind.JsonDeserializer<List<Principal>>
Custom deserializer for a list of Principal objects from JSON.
This class parses a JSON structure where each field represents a principal type, and its value is either a string or an array of strings. Wildcard and regex formatting is applied to each value.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
com.fasterxml.jackson.databind.JsonDeserializer.None -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext context) Deserializes JSON into a list of Principal objects.Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
Constructor Details
-
PrincipalDeserializer
public PrincipalDeserializer()
-
-
Method Details
-
deserialize
public List<Principal> deserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext context) throws IOException Deserializes JSON into a list of Principal objects.- Specified by:
deserializein classcom.fasterxml.jackson.databind.JsonDeserializer<List<Principal>>- Parameters:
jp- the JSON parsercontext- the deserialization context- Returns:
- a list of Principal objects
- Throws:
IOException- if an I/O error occurs or the JSON is invalid
-