Class JacksonMapperUtil

java.lang.Object
io.quarkus.resteasy.reactive.jackson.runtime.mappers.JacksonMapperUtil

public class JacksonMapperUtil extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Map<String,String>
    buildReverseNameIndex(com.fasterxml.jackson.databind.PropertyNamingStrategy strategy, String[] translatableFieldNames)
    Builds a reverse-translation index mapping strategy-translated JSON field names back to Java field names.
    static void
    collectUnwrappedFields(com.fasterxml.jackson.databind.JsonNode root, String fieldName, String prefix, String suffix)
     
    static com.fasterxml.jackson.databind.JavaType
    getGenericRootType(Type genericType, com.fasterxml.jackson.databind.ObjectWriter defaultWriter)
    Determine the root type that should be used for serialization of generic types.
    static com.fasterxml.jackson.databind.JavaType[]
    getGenericsJavaTypes(com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.databind.BeanProperty property)
     
    static boolean
    includeSecureField(com.fasterxml.jackson.databind.SerializerProvider serializerProvider, String[] rolesAllowed)
     
    static boolean
    includeSecureField(String[] rolesAllowed)
     
    static boolean
    isPublicGetterVisible(com.fasterxml.jackson.databind.SerializerProvider provider)
     
    static boolean
    isPublicIsGetterVisible(com.fasterxml.jackson.databind.SerializerProvider provider)
     
    static boolean
    isViewIncluded(Class<?> activeView, Class<?>[] viewClasses)
     
    static void
    serializeAnyGetterMap(Map<?,?> map, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
     
    static void
    serializeBooleanAsNumber(boolean value, com.fasterxml.jackson.core.JsonGenerator generator)
     
    static void
    serializeCollection(Object value, Class<?> collectionClass, Class<?> elementClass, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
     
    static void
    serializeDateAsTimestamp(Date value, com.fasterxml.jackson.core.JsonGenerator generator)
     
    static void
    serializeFormattedDate(Object value, String pattern, String timezone, com.fasterxml.jackson.core.JsonGenerator generator)
     
    static void
    serializeFormattedTemporal(Object value, String pattern, String timezone, com.fasterxml.jackson.core.JsonGenerator generator)
     
    static void
    serializePojo(Object value, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
     
    static void
    serializePojo(Object value, Object bean, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider)
     
    static void
    serializeTemporalAsTimestamp(Object value, com.fasterxml.jackson.core.JsonGenerator generator)
     
    static void
    serializeUnwrapped(Object value, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider, Set<String> ignoredProperties, String prefix, String suffix)
     
    static void
    writeFieldName(com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.PropertyNamingStrategy strategy, String javaFieldName, com.fasterxml.jackson.core.SerializableString defaultName)
    Writes a field name to the JSON generator, translating through the ObjectMapper's PropertyNamingStrategy if one is configured.

    Methods inherited from class java.lang.Object

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

    • JacksonMapperUtil

      public JacksonMapperUtil()
  • Method Details

    • isPublicGetterVisible

      public static boolean isPublicGetterVisible(com.fasterxml.jackson.databind.SerializerProvider provider)
    • isPublicIsGetterVisible

      public static boolean isPublicIsGetterVisible(com.fasterxml.jackson.databind.SerializerProvider provider)
    • serializeBooleanAsNumber

      public static void serializeBooleanAsNumber(boolean value, com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
      Throws:
      IOException
    • serializeDateAsTimestamp

      public static void serializeDateAsTimestamp(Date value, com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
      Throws:
      IOException
    • serializeFormattedDate

      public static void serializeFormattedDate(Object value, String pattern, String timezone, com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
      Throws:
      IOException
    • serializeFormattedTemporal

      public static void serializeFormattedTemporal(Object value, String pattern, String timezone, com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
      Throws:
      IOException
    • serializeTemporalAsTimestamp

      public static void serializeTemporalAsTimestamp(Object value, com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
      Throws:
      IOException
    • isViewIncluded

      public static boolean isViewIncluded(Class<?> activeView, Class<?>[] viewClasses)
    • includeSecureField

      public static boolean includeSecureField(com.fasterxml.jackson.databind.SerializerProvider serializerProvider, String[] rolesAllowed)
    • includeSecureField

      public static boolean includeSecureField(String[] rolesAllowed)
    • writeFieldName

      public static void writeFieldName(com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.PropertyNamingStrategy strategy, String javaFieldName, com.fasterxml.jackson.core.SerializableString defaultName) throws IOException
      Writes a field name to the JSON generator, translating through the ObjectMapper's PropertyNamingStrategy if one is configured. When no strategy is set, the pre-encoded defaultName is used for zero overhead.
      Throws:
      IOException
    • buildReverseNameIndex

      public static Map<String,String> buildReverseNameIndex(com.fasterxml.jackson.databind.PropertyNamingStrategy strategy, String[] translatableFieldNames)
      Builds a reverse-translation index mapping strategy-translated JSON field names back to Java field names. Called once at the start of deserialization so that per-field lookups are O(1) via Map.getOrDefault(java.lang.Object, V) instead of O(n) scans.
    • getGenericRootType

      public static com.fasterxml.jackson.databind.JavaType getGenericRootType(Type genericType, com.fasterxml.jackson.databind.ObjectWriter defaultWriter)
      Determine the root type that should be used for serialization of generic types. Returns the appropriate root type or null if default serialization should be used.
    • getGenericsJavaTypes

      public static com.fasterxml.jackson.databind.JavaType[] getGenericsJavaTypes(com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.databind.BeanProperty property)
    • serializePojo

      public static void serializePojo(Object value, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException
      Throws:
      IOException
    • serializePojo

      public static void serializePojo(Object value, Object bean, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException
      Throws:
      IOException
    • serializeCollection

      public static void serializeCollection(Object value, Class<?> collectionClass, Class<?> elementClass, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException
      Throws:
      IOException
    • serializeUnwrapped

      public static void serializeUnwrapped(Object value, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider, Set<String> ignoredProperties, String prefix, String suffix) throws IOException
      Throws:
      IOException
    • collectUnwrappedFields

      public static void collectUnwrappedFields(com.fasterxml.jackson.databind.JsonNode root, String fieldName, String prefix, String suffix)
    • serializeAnyGetterMap

      public static void serializeAnyGetterMap(Map<?,?> map, com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException
      Throws:
      IOException