Class MoshiConfig

java.lang.Object
org.jdbi.v3.moshi.MoshiConfig
All Implemented Interfaces:
JdbiConfig<MoshiConfig>

@Beta public class MoshiConfig extends Object implements JdbiConfig<MoshiConfig>
Configuration class for Moshi integration.
  • Constructor Details

    • MoshiConfig

      public MoshiConfig()
  • Method Details

    • setMoshi

      public MoshiConfig setMoshi(com.squareup.moshi.Moshi moshi)
      Set the Moshi to use for json conversion.
      Parameters:
      moshi - the mapper to use
      Returns:
      this
    • getMoshi

      public com.squareup.moshi.Moshi getMoshi()
      Returns the Moshi to use for json conversion.
      Returns:
      the Moshi to use for json conversion.
    • createCopy

      public MoshiConfig createCopy()
      Description copied from interface: JdbiConfig
      Returns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.
      Specified by:
      createCopy in interface JdbiConfig<MoshiConfig>
      Returns:
      a copy of this configuration object.