如何在firebase Java lib中使用jackson mix-in?我想将@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)添加到第三方lib并混入。
更新
我创建了一个混合模块:
public interface CustomTabMixIn {
@JsonIgnore boolean isCustomObject();
}
public class SFMetadataModule extends SimpleModule
{
public SFMetadataModule() {
super("SF-Metadata", new Version(0,0,1,null));
}
@Override
public void setupModule(SetupContext context)
{
context.setMixInAnnotations(com.sforce.soap.metadata.CustomTab.class, CustomTabMixIn.class);
}
}
如何使用firebase注册我的模块?
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new SFMetadataModule());