Class YamlFormatter

  • All Implemented Interfaces:
    OutputFormatter

    public class YamlFormatter
    extends BaseDataOutputFormatter
    Format objects as YAML, this will convert any Map/Collection into Yaml, and any Object that implements Formatable and returns a non-null Map or List. If the object does not correspond to one of those inputs, the base formatter will be used
    • Constructor Detail

      • YamlFormatter

        public YamlFormatter()
      • YamlFormatter

        public YamlFormatter​(org.yaml.snakeyaml.representer.Representer representer,
                             org.yaml.snakeyaml.DumperOptions options)
      • YamlFormatter

        public YamlFormatter​(java.util.function.Function<java.lang.Object,​java.util.Optional<Formatable>> dataFormatter,
                             org.yaml.snakeyaml.Yaml yaml)
      • YamlFormatter

        public YamlFormatter​(OutputFormatter base)
        Parameters:
        base - base formatter
      • YamlFormatter

        public YamlFormatter​(OutputFormatter base,
                             java.util.function.Function<java.lang.Object,​java.util.Optional<Formatable>> dataFormatter,
                             org.yaml.snakeyaml.Yaml yaml)
      • YamlFormatter

        public YamlFormatter​(OutputFormatter base,
                             org.yaml.snakeyaml.DumperOptions options)
        Parameters:
        base - base formatter
        options - yaml options