Class StringDeserializer

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<List<String>>
org.iam.policy.grammer.StringDeserializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider

public class StringDeserializer extends com.fasterxml.jackson.databind.JsonDeserializer<List<String>>
Custom Jackson deserializer for lists of strings, with regex formatting.

Converts JSON string or array of strings to a list, formatting each string for regex matching ('.' to '\\.', '*' to '.*', '?' to '.').

Since:
2025-02-28
Author:
  • 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 a JSON node into a list of formatted strings.

    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

    • StringDeserializer

      public StringDeserializer()
  • Method Details

    • deserialize

      public List<String> deserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext context) throws IOException
      Deserializes a JSON node into a list of formatted strings.
      Specified by:
      deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<List<String>>
      Parameters:
      jp - the JSON parser
      context - the deserialization context
      Returns:
      a list of formatted strings
      Throws:
      IOException - if an I/O error occurs