Jackson deserialize nulls to empty list with no access to entity











up vote
0
down vote

favorite












What I am trying to achieve:



to deserialize null values to empty lists



Note: I cannot change/annotate the entities, because they do come from a jar.



I have the following code:



import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.module.SimpleModule;

import java.io.IOException;
import java.util.Collections;
import java.util.List;

public class MyJsonMapperList extends ObjectMapper{

private static final MyJsonMapperList jsonMapper = new MyJsonMapperList();

public MyJsonMapperList() {
SimpleModule sm = new SimpleModule();
sm.addDeserializer(List.class, new NullToEmptyListDeserializer());
super.registerModule(sm);
// setSerializationInclusion(JsonInclude.Include.NON_NULL);
// disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
}

private static class NullToEmptyListDeserializer extends JsonDeserializer<List> {

@Override
public List deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
ObjectMapper mapper = new ObjectMapper();
mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forContentNulls(Nulls.AS_EMPTY));
mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forValueNulls(Nulls.AS_EMPTY));
mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forValueNulls(Nulls.AS_EMPTY, Nulls.AS_EMPTY));
return mapper.readValue(jsonParser, new TypeReference<List>(){});
}

@Override
public List getNullValue(DeserializationContext ctx) {
return Collections.emptyList();
}
}

public static <T> T fromJson(String json, Class<T> tClass) throws IOException {
if (json == null) { return null; }
return jsonMapper.readerFor(tClass).readValue(json);

}

public static String toJson(Object bean) throws JsonProcessingException {
if (bean == null) { return null; }
return jsonMapper.writer().writeValueAsString(bean);
}


The source for this code is from here.
Did I interpret something incorrectly from the Kotlin code provided by shyiko?



*Note I've tried also directly with setDeserializerModifier like:



 public MyJsonMapperList () {
SimpleModule sm = new SimpleModule();
// sm.addDeserializer(CollectionType.class, new NullToEmptyListDeserializer ());
sm.setDeserializerModifier(new BeanDeserializerModifier() {
@Override
public JsonDeserializer<?> modifyCollectionDeserializer(DeserializationConfig config, CollectionType type, BeanDescription beanDesc, JsonDeserializer<?> deserializer) {
deserializer = new JsonDeserializer<List<?>>() {
@Override
public List<?> deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(jsonParser, new TypeReference<List>(){});
}
@Override
public List getNullValue(DeserializationContext ctx) {
return Collections.emptyList();
}
};
return deserializer;
}
});
super.registerModule(sm);
// setSerializationInclusion(JsonInclude.Include.NON_NULL);
// disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

}


The error which I get:



java.lang.IllegalArgumentException: Cannot handle managed/back reference 'defaultReference': type: value deserializer of type MyJsonMapperList$NullToEmptyListDeserializer does not support them

at com.fasterxml.jackson.databind.JsonDeserializer.findBackReference(JsonDeserializer.java:365)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase._resolveManagedReferenceProperty(BeanDeserializerBase.java:764)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:474)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:293)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:477)
at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:1935)
at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:189)
at com.fasterxml.jackson.databind.ObjectMapper._newReader(ObjectMapper.java:658)
at com.fasterxml.jackson.databind.ObjectMapper.readerFor(ObjectMapper.java:3517)
at ...MyJsonMapperList.fromJson(MyJsonMapperList.java:47)


Entities do not have any @JsonManagedReference and @JsonBackReference annotations (even if they had, could not modify them)



Jackson dependency:



    <dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.0</version>
</dependency>


What am I missing?



Are there other possibilities which I ommitted?



This answer sounded promising, but you don't have access to objectMapperBuilder because of the protected access.










share|improve this question




























    up vote
    0
    down vote

    favorite












    What I am trying to achieve:



    to deserialize null values to empty lists



    Note: I cannot change/annotate the entities, because they do come from a jar.



    I have the following code:



    import com.fasterxml.jackson.annotation.JsonInclude;
    import com.fasterxml.jackson.annotation.JsonSetter;
    import com.fasterxml.jackson.annotation.Nulls;
    import com.fasterxml.jackson.core.JsonParser;
    import com.fasterxml.jackson.core.JsonProcessingException;
    import com.fasterxml.jackson.core.type.TypeReference;
    import com.fasterxml.jackson.databind.*;
    import com.fasterxml.jackson.databind.module.SimpleModule;

    import java.io.IOException;
    import java.util.Collections;
    import java.util.List;

    public class MyJsonMapperList extends ObjectMapper{

    private static final MyJsonMapperList jsonMapper = new MyJsonMapperList();

    public MyJsonMapperList() {
    SimpleModule sm = new SimpleModule();
    sm.addDeserializer(List.class, new NullToEmptyListDeserializer());
    super.registerModule(sm);
    // setSerializationInclusion(JsonInclude.Include.NON_NULL);
    // disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
    }

    private static class NullToEmptyListDeserializer extends JsonDeserializer<List> {

    @Override
    public List deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
    ObjectMapper mapper = new ObjectMapper();
    mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forContentNulls(Nulls.AS_EMPTY));
    mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forValueNulls(Nulls.AS_EMPTY));
    mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forValueNulls(Nulls.AS_EMPTY, Nulls.AS_EMPTY));
    return mapper.readValue(jsonParser, new TypeReference<List>(){});
    }

    @Override
    public List getNullValue(DeserializationContext ctx) {
    return Collections.emptyList();
    }
    }

    public static <T> T fromJson(String json, Class<T> tClass) throws IOException {
    if (json == null) { return null; }
    return jsonMapper.readerFor(tClass).readValue(json);

    }

    public static String toJson(Object bean) throws JsonProcessingException {
    if (bean == null) { return null; }
    return jsonMapper.writer().writeValueAsString(bean);
    }


    The source for this code is from here.
    Did I interpret something incorrectly from the Kotlin code provided by shyiko?



    *Note I've tried also directly with setDeserializerModifier like:



     public MyJsonMapperList () {
    SimpleModule sm = new SimpleModule();
    // sm.addDeserializer(CollectionType.class, new NullToEmptyListDeserializer ());
    sm.setDeserializerModifier(new BeanDeserializerModifier() {
    @Override
    public JsonDeserializer<?> modifyCollectionDeserializer(DeserializationConfig config, CollectionType type, BeanDescription beanDesc, JsonDeserializer<?> deserializer) {
    deserializer = new JsonDeserializer<List<?>>() {
    @Override
    public List<?> deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
    ObjectMapper mapper = new ObjectMapper();
    return mapper.readValue(jsonParser, new TypeReference<List>(){});
    }
    @Override
    public List getNullValue(DeserializationContext ctx) {
    return Collections.emptyList();
    }
    };
    return deserializer;
    }
    });
    super.registerModule(sm);
    // setSerializationInclusion(JsonInclude.Include.NON_NULL);
    // disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

    }


    The error which I get:



    java.lang.IllegalArgumentException: Cannot handle managed/back reference 'defaultReference': type: value deserializer of type MyJsonMapperList$NullToEmptyListDeserializer does not support them

    at com.fasterxml.jackson.databind.JsonDeserializer.findBackReference(JsonDeserializer.java:365)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase._resolveManagedReferenceProperty(BeanDeserializerBase.java:764)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:474)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:293)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
    at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
    at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:477)
    at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:1935)
    at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:189)
    at com.fasterxml.jackson.databind.ObjectMapper._newReader(ObjectMapper.java:658)
    at com.fasterxml.jackson.databind.ObjectMapper.readerFor(ObjectMapper.java:3517)
    at ...MyJsonMapperList.fromJson(MyJsonMapperList.java:47)


    Entities do not have any @JsonManagedReference and @JsonBackReference annotations (even if they had, could not modify them)



    Jackson dependency:



        <dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.9.0</version>
    </dependency>


    What am I missing?



    Are there other possibilities which I ommitted?



    This answer sounded promising, but you don't have access to objectMapperBuilder because of the protected access.










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      What I am trying to achieve:



      to deserialize null values to empty lists



      Note: I cannot change/annotate the entities, because they do come from a jar.



      I have the following code:



      import com.fasterxml.jackson.annotation.JsonInclude;
      import com.fasterxml.jackson.annotation.JsonSetter;
      import com.fasterxml.jackson.annotation.Nulls;
      import com.fasterxml.jackson.core.JsonParser;
      import com.fasterxml.jackson.core.JsonProcessingException;
      import com.fasterxml.jackson.core.type.TypeReference;
      import com.fasterxml.jackson.databind.*;
      import com.fasterxml.jackson.databind.module.SimpleModule;

      import java.io.IOException;
      import java.util.Collections;
      import java.util.List;

      public class MyJsonMapperList extends ObjectMapper{

      private static final MyJsonMapperList jsonMapper = new MyJsonMapperList();

      public MyJsonMapperList() {
      SimpleModule sm = new SimpleModule();
      sm.addDeserializer(List.class, new NullToEmptyListDeserializer());
      super.registerModule(sm);
      // setSerializationInclusion(JsonInclude.Include.NON_NULL);
      // disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
      }

      private static class NullToEmptyListDeserializer extends JsonDeserializer<List> {

      @Override
      public List deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
      ObjectMapper mapper = new ObjectMapper();
      mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forContentNulls(Nulls.AS_EMPTY));
      mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forValueNulls(Nulls.AS_EMPTY));
      mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forValueNulls(Nulls.AS_EMPTY, Nulls.AS_EMPTY));
      return mapper.readValue(jsonParser, new TypeReference<List>(){});
      }

      @Override
      public List getNullValue(DeserializationContext ctx) {
      return Collections.emptyList();
      }
      }

      public static <T> T fromJson(String json, Class<T> tClass) throws IOException {
      if (json == null) { return null; }
      return jsonMapper.readerFor(tClass).readValue(json);

      }

      public static String toJson(Object bean) throws JsonProcessingException {
      if (bean == null) { return null; }
      return jsonMapper.writer().writeValueAsString(bean);
      }


      The source for this code is from here.
      Did I interpret something incorrectly from the Kotlin code provided by shyiko?



      *Note I've tried also directly with setDeserializerModifier like:



       public MyJsonMapperList () {
      SimpleModule sm = new SimpleModule();
      // sm.addDeserializer(CollectionType.class, new NullToEmptyListDeserializer ());
      sm.setDeserializerModifier(new BeanDeserializerModifier() {
      @Override
      public JsonDeserializer<?> modifyCollectionDeserializer(DeserializationConfig config, CollectionType type, BeanDescription beanDesc, JsonDeserializer<?> deserializer) {
      deserializer = new JsonDeserializer<List<?>>() {
      @Override
      public List<?> deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
      ObjectMapper mapper = new ObjectMapper();
      return mapper.readValue(jsonParser, new TypeReference<List>(){});
      }
      @Override
      public List getNullValue(DeserializationContext ctx) {
      return Collections.emptyList();
      }
      };
      return deserializer;
      }
      });
      super.registerModule(sm);
      // setSerializationInclusion(JsonInclude.Include.NON_NULL);
      // disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

      }


      The error which I get:



      java.lang.IllegalArgumentException: Cannot handle managed/back reference 'defaultReference': type: value deserializer of type MyJsonMapperList$NullToEmptyListDeserializer does not support them

      at com.fasterxml.jackson.databind.JsonDeserializer.findBackReference(JsonDeserializer.java:365)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase._resolveManagedReferenceProperty(BeanDeserializerBase.java:764)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:474)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:293)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
      at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
      at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:477)
      at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:1935)
      at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:189)
      at com.fasterxml.jackson.databind.ObjectMapper._newReader(ObjectMapper.java:658)
      at com.fasterxml.jackson.databind.ObjectMapper.readerFor(ObjectMapper.java:3517)
      at ...MyJsonMapperList.fromJson(MyJsonMapperList.java:47)


      Entities do not have any @JsonManagedReference and @JsonBackReference annotations (even if they had, could not modify them)



      Jackson dependency:



          <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.9.0</version>
      </dependency>


      What am I missing?



      Are there other possibilities which I ommitted?



      This answer sounded promising, but you don't have access to objectMapperBuilder because of the protected access.










      share|improve this question















      What I am trying to achieve:



      to deserialize null values to empty lists



      Note: I cannot change/annotate the entities, because they do come from a jar.



      I have the following code:



      import com.fasterxml.jackson.annotation.JsonInclude;
      import com.fasterxml.jackson.annotation.JsonSetter;
      import com.fasterxml.jackson.annotation.Nulls;
      import com.fasterxml.jackson.core.JsonParser;
      import com.fasterxml.jackson.core.JsonProcessingException;
      import com.fasterxml.jackson.core.type.TypeReference;
      import com.fasterxml.jackson.databind.*;
      import com.fasterxml.jackson.databind.module.SimpleModule;

      import java.io.IOException;
      import java.util.Collections;
      import java.util.List;

      public class MyJsonMapperList extends ObjectMapper{

      private static final MyJsonMapperList jsonMapper = new MyJsonMapperList();

      public MyJsonMapperList() {
      SimpleModule sm = new SimpleModule();
      sm.addDeserializer(List.class, new NullToEmptyListDeserializer());
      super.registerModule(sm);
      // setSerializationInclusion(JsonInclude.Include.NON_NULL);
      // disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
      }

      private static class NullToEmptyListDeserializer extends JsonDeserializer<List> {

      @Override
      public List deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
      ObjectMapper mapper = new ObjectMapper();
      mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forContentNulls(Nulls.AS_EMPTY));
      mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forValueNulls(Nulls.AS_EMPTY));
      mapper.configOverride(List.class).setSetterInfo(JsonSetter.Value.forValueNulls(Nulls.AS_EMPTY, Nulls.AS_EMPTY));
      return mapper.readValue(jsonParser, new TypeReference<List>(){});
      }

      @Override
      public List getNullValue(DeserializationContext ctx) {
      return Collections.emptyList();
      }
      }

      public static <T> T fromJson(String json, Class<T> tClass) throws IOException {
      if (json == null) { return null; }
      return jsonMapper.readerFor(tClass).readValue(json);

      }

      public static String toJson(Object bean) throws JsonProcessingException {
      if (bean == null) { return null; }
      return jsonMapper.writer().writeValueAsString(bean);
      }


      The source for this code is from here.
      Did I interpret something incorrectly from the Kotlin code provided by shyiko?



      *Note I've tried also directly with setDeserializerModifier like:



       public MyJsonMapperList () {
      SimpleModule sm = new SimpleModule();
      // sm.addDeserializer(CollectionType.class, new NullToEmptyListDeserializer ());
      sm.setDeserializerModifier(new BeanDeserializerModifier() {
      @Override
      public JsonDeserializer<?> modifyCollectionDeserializer(DeserializationConfig config, CollectionType type, BeanDescription beanDesc, JsonDeserializer<?> deserializer) {
      deserializer = new JsonDeserializer<List<?>>() {
      @Override
      public List<?> deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
      ObjectMapper mapper = new ObjectMapper();
      return mapper.readValue(jsonParser, new TypeReference<List>(){});
      }
      @Override
      public List getNullValue(DeserializationContext ctx) {
      return Collections.emptyList();
      }
      };
      return deserializer;
      }
      });
      super.registerModule(sm);
      // setSerializationInclusion(JsonInclude.Include.NON_NULL);
      // disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

      }


      The error which I get:



      java.lang.IllegalArgumentException: Cannot handle managed/back reference 'defaultReference': type: value deserializer of type MyJsonMapperList$NullToEmptyListDeserializer does not support them

      at com.fasterxml.jackson.databind.JsonDeserializer.findBackReference(JsonDeserializer.java:365)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase._resolveManagedReferenceProperty(BeanDeserializerBase.java:764)
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:474)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:293)
      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
      at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
      at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:477)
      at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:1935)
      at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:189)
      at com.fasterxml.jackson.databind.ObjectMapper._newReader(ObjectMapper.java:658)
      at com.fasterxml.jackson.databind.ObjectMapper.readerFor(ObjectMapper.java:3517)
      at ...MyJsonMapperList.fromJson(MyJsonMapperList.java:47)


      Entities do not have any @JsonManagedReference and @JsonBackReference annotations (even if they had, could not modify them)



      Jackson dependency:



          <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.9.0</version>
      </dependency>


      What am I missing?



      Are there other possibilities which I ommitted?



      This answer sounded promising, but you don't have access to objectMapperBuilder because of the protected access.







      java json jackson deserialization jackson-databind






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 7 at 13:49

























      asked Nov 7 at 13:43









      David Laci

      437




      437





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53190680%2fjackson-deserialize-nulls-to-empty-list-with-no-access-to-entity%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53190680%2fjackson-deserialize-nulls-to-empty-list-with-no-access-to-entity%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini