Class JsonObjectMapperProvider

java.lang.Object
org.springframework.integration.support.json.JsonObjectMapperProvider

public final class JsonObjectMapperProvider
extends java.lang.Object
Simple factory to provide JsonObjectMapper instances based on jackson-databind lib in the classpath. If there is no JSON processor in classpath, IllegalStateException will be thrown.
Since:
3.0
See Also:
Jackson2JsonObjectMapper
  • Method Summary

    Modifier and Type Method Description
    static boolean jsonAvailable()
    Returns true if a supported JSON implementation is on the class path.
    static JsonObjectMapper<?,​?> newInstance()
    Return an object mapper if available.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • newInstance

      public static JsonObjectMapper<?,​?> newInstance()
      Return an object mapper if available.
      Returns:
      the mapper.
      Throws:
      java.lang.IllegalStateException - if an implementation is not available.
    • jsonAvailable

      public static boolean jsonAvailable()
      Returns true if a supported JSON implementation is on the class path.
      Returns:
      true if newInstance() will return a mapper.
      Since:
      4.2.7