Package org.iam.policy.grammer
Class ConditionDeserializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider
public class ConditionDeserializer
extends com.fasterxml.jackson.databind.JsonDeserializer<List<Condition>>
Custom deserializer for a list of Condition objects from JSON.
This class parses a JSON structure where each field is a condition operator, and its value is a mapping from keys to string or array of strings. It also handles wildcard and regex formatting for non-IP operators.
-
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 Condition 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
-
ConditionDeserializer
public ConditionDeserializer()
-
-
Method Details
-
deserialize
public List<Condition> deserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext context) throws IOException Deserializes JSON into a list of Condition objects.- Specified by:
deserializein classcom.fasterxml.jackson.databind.JsonDeserializer<List<Condition>>- Parameters:
jp- the JSON parsercontext- the deserialization context- Returns:
- a list of Condition objects
- Throws:
IOException- if an I/O error occurs
-