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

    https://github.com/apache/incubator-brooklyn/pull/1177#discussion_r51308146
  
    --- Diff: 
brooklyn-server/rest/rest-server/src/main/java/org/apache/brooklyn/rest/util/json/BrooklynJacksonJsonProvider.java
 ---
    @@ -137,25 +136,21 @@ public static ObjectMapper 
newPrivateObjectMapper(ManagementContext mgmt) {
                 throw new IllegalStateException("No management context 
available for creating ObjectMapper");
             }
     
    -        SerializationConfig defaultConfig = new 
ObjectMapper().getSerializationConfig();
    -        SerializationConfig sc = new SerializationConfig(
    -            defaultConfig.getClassIntrospector() /* 
ObjectMapper.DEFAULT_INTROSPECTOR */,
    -            defaultConfig.getAnnotationIntrospector() /* 
ObjectMapper.DEFAULT_ANNOTATION_INTROSPECTOR */,
    -            new PossiblyStrictPreferringFieldsVisibilityChecker(),
    -            null, null, TypeFactory.defaultInstance(), null);
    -
             ConfigurableSerializerProvider sp = new 
ConfigurableSerializerProvider();
             sp.setUnknownTypeSerializer(new 
ErrorAndToStringUnknownTypeSerializer());
     
    -        ObjectMapper mapper = new ObjectMapper(null, sp, null, sc, null);
    +        ObjectMapper mapper = new ObjectMapper();
    +        mapper.setSerializerProvider(sp);
    +        mapper.setVisibility(new 
PossiblyStrictPreferringFieldsVisibilityChecker());
    +
             SimpleModule mapperModule = new SimpleModule("Brooklyn", new 
Version(0, 0, 0, "ignored"));
     
             new 
BidiSerialization.ManagementContextSerialization(mgmt).install(mapperModule);
             new 
BidiSerialization.EntitySerialization(mgmt).install(mapperModule);
             new 
BidiSerialization.LocationSerialization(mgmt).install(mapperModule);
    -        mapperModule.addSerializer(new MultimapSerializer());
    --- End diff --
    
    awesome


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to