@Override
    public Pattern deserialize(final JsonParser parser, final DeserializationContext context) throws IOException {
        val patternString = parser.getText();
        return RegexUtils.createPattern(patternString);
    }
This is {@link PatternJsonDeserializer}.

@author Misagh Moayyed
@since 7.2.0
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/serialization/PatternJsonDeserializer.java