Class JacksonFormat

java.lang.Object
dev.siroshun.configapi.format.jackson.JacksonFormat
All Implemented Interfaces:
FileFormat<MapNode>

@NotNullByDefault public final class JacksonFormat extends Object implements FileFormat<MapNode>
A FileFormat implementation that loading/saving MapNode from/to json files using Jackson's ObjectMapper.

Supported Nodes:

  • Field Details

    • DEFAULT

      public static final JacksonFormat DEFAULT
      An instance of JacksonFormat that created from a plain ObjectMapper.
    • PRETTY_PRINTING

      public static final JacksonFormat PRETTY_PRINTING
      An instance of JacksonFormat that created from a ObjectMapper that is enabled pretty printing.
  • Constructor Details

    • JacksonFormat

      public JacksonFormat(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      The constructor of JacksonFormat.
      Parameters:
      objectMapper - an ObjectMapper that is used for serializing/deserializing json
  • Method Details