All Downloads are FREE. Search and download functionalities are using the official Maven repository.

android-java.jsonUtil.mustache Maven / Gradle / Ivy

The newest version!
package {{invokerPackage}};

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.core.JsonGenerator.Feature;

public class JsonUtil {
  public static ObjectMapper mapper;

  static {
    mapper = new ObjectMapper();
    mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
  }

  public static ObjectMapper getJsonMapper() {
    return mapper;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy