Class JsonConverter

  • All Implemented Interfaces:
    org.pac4j.core.profile.converter.AttributeConverter

    public final class JsonConverter
    extends java.lang.Object
    implements org.pac4j.core.profile.converter.AttributeConverter
    This class converts a JSON node (or string) into an object.
    Since:
    1.9.0
    Author:
    Jerome Leleu
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonConverter​(java.lang.Class<? extends java.lang.Object> clazz)  
      JsonConverter​(java.lang.Class<? extends java.lang.Object> clazz, com.fasterxml.jackson.core.type.TypeReference<? extends java.lang.Object> typeReference)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object convert​(java.lang.Object attribute)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonConverter

        public JsonConverter​(java.lang.Class<? extends java.lang.Object> clazz)
      • JsonConverter

        public JsonConverter​(java.lang.Class<? extends java.lang.Object> clazz,
                             com.fasterxml.jackson.core.type.TypeReference<? extends java.lang.Object> typeReference)
    • Method Detail

      • convert

        public java.lang.Object convert​(java.lang.Object attribute)
        Specified by:
        convert in interface org.pac4j.core.profile.converter.AttributeConverter