Though this form look more standard?

  public static final ObjectMapper USER_PREFS_MAPPER = 
configureDefaultObjectMapper(JsonMapper.builder(SmileFactory.builder()
    .disable(ENCODE_BINARY_AS_7BIT)
    .enable(CHECK_SHARED_STRING_VALUES)
    .build())
    .activateDefaultTyping(BasicPolymorphicTypeValidator.builder().build(), 
ObjectMapper.DefaultTyping.JAVA_LANG_OBJECT, 
JsonTypeInfo.As.WRAPPER_ARRAY).build()
  );



On Friday, September 27, 2019 at 11:25:36 AM UTC+1, Guido Medina wrote:
>
> So, will then the following provide me the same functionality?
>
> public static final ObjectMapper USER_PREFS_MAPPER = 
> configureDefaultObjectMapper(JsonMapper.builder(
>   SmileFactory.builder()
>     .disable(ENCODE_BINARY_AS_7BIT)
>     .enable(CHECK_SHARED_STRING_VALUES)
>     .build())
>   .activateDefaultTyping(LaissezFaireSubTypeValidator.instance, 
> ObjectMapper.DefaultTyping.JAVA_LANG_OBJECT, 
> JsonTypeInfo.As.WRAPPER_ARRAY).build()
> );
>
>
>
> On Friday, September 27, 2019 at 10:41:53 AM UTC+1, Marc Dzaebel wrote:
>>
>> Guido,
>>
>> I already asked such questions in the "polymorphic serialization" issue 
>> but I agree, that we'd need an adapted documentation on this topic. You 
>> might look in test samples with 
>> JsonMapper.builder().activateDefaultTyping(...).
>>
>> Marc
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/7f809469-55d0-4e62-ad21-3b3d2cfd5570%40googlegroups.com.

Reply via email to