core/src/main/java/org/apache/druid/java/util/common/jackson/JacksonUtils.java
/**
   * Serializes an object using a {@link JsonGenerator}. If you have a {@link SerializerProvider}, this is better than
   * calling {@link JsonGenerator#writeObject(Object)}, because it avoids re-creating the {@link SerializerProvider}
   * for each serialized object.
   */
Serializes an object using a  JsonGenerator. If you have a  SerializerProvider, this is better than
calling  JsonGenerator#writeObject(Object), because it avoids re-creating the  SerializerProvider
for each serialized object.
Serializes an object using a JsonGenerator . If you have a SerializerProvider this is better than calling JsonGenerator#writeObject ( Object ) because it avoids re - creating the SerializerProvider for each serialized object .
public static void writeObjectUsingSerializerProvider(
      final JsonGenerator jsonGenerator,
      final SerializerProvider serializers,
      @Nullable final Object o
  ) throws IOException
  {
    if (o == null) {
      jsonGenerator.writeNull();
    } else {
      final JsonSerializer<Object> serializer = getSerializer(serializers, o.getClass());
      serializer.serialize(o, jsonGenerator, serializers);
    }
  }
public static void writeObjectUsingSerializerProvider ( final JsonGenerator jsonGenerator , final SerializerProvider serializers , @ Nullable final Object o ) throws IOException { if ( o == null ) { jsonGenerator . writeNull ( ) ; } else { final JsonSerializer < Object > serializer = getSerializer ( serializers , o . getClass ( ) ) ; serializer . serialize ( o , jsonGenerator , serializers ) ; } }
Serializes an object using a {@link JsonGenerator}.
Serializes an object using a { @link JsonGenerator } .