Github user GJL commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5168#discussion_r157026313
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/util/RestMapperUtils.java
 ---
    @@ -33,10 +40,23 @@
                objectMapper.enable(
                        DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES,
                        DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES,
    -                   DeserializationFeature.FAIL_ON_READING_DUP_TREE_KEY,
    -                   
DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES);
    +                   DeserializationFeature.FAIL_ON_READING_DUP_TREE_KEY);
                objectMapper.disable(
                        SerializationFeature.FAIL_ON_EMPTY_BEANS);
    +
    +           final SimpleModule jacksonFlinkModule = new SimpleModule();
    +
    +           final JavaType serializedValueWildcardType = objectMapper
    +                   .getTypeFactory()
    +                   .constructType(new TypeReference<SerializedValue<?>>() {
    +                   });
    +
    +           jacksonFlinkModule.addSerializer(new 
SerializedValueSerializer(serializedValueWildcardType));
    --- End diff --
    
    Could also be done using `@JsonSerialization` annotation


---

Reply via email to