Class PrincipalDeserializer

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<List<Principal>>
org.iam.policy.grammer.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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<List<Principal>>
      Parameters:
      jp - the JSON parser
      context - the deserialization context
      Returns:
      a list of Principal objects
      Throws:
      IOException - if an I/O error occurs or the JSON is invalid