Class YAMLDataFormat


  • @Metadata(firstVersion="2.17.0",
              label="dataformat,transformation,yaml",
              title="YAML")
    public class YAMLDataFormat
    extends DataFormatDefinition
    Marshal and unmarshal Java objects to and from YAML.
    • Constructor Detail

      • YAMLDataFormat

        public YAMLDataFormat()
      • YAMLDataFormat

        public YAMLDataFormat​(YAMLLibrary library)
      • YAMLDataFormat

        public YAMLDataFormat​(YAMLLibrary library,
                              Class<?> unmarshalType)
    • Method Detail

      • setLibrary

        public void setLibrary​(YAMLLibrary library)
        Which yaml library to use.

        By default it is SnakeYAML

      • getUnmarshalType

        public Class<?> getUnmarshalType()
      • setUnmarshalType

        public void setUnmarshalType​(Class<?> type)
        Class of the object to be created
      • getUnmarshalTypeName

        public String getUnmarshalTypeName()
      • setUnmarshalTypeName

        public void setUnmarshalTypeName​(String unmarshalTypeName)
        Class name of the java type to use when unmarshalling
      • setClassLoader

        public void setClassLoader​(ClassLoader classLoader)
        Set a custom classloader
      • getConstructor

        public String getConstructor()
      • setConstructor

        public void setConstructor​(String constructor)
        BaseConstructor to construct incoming documents.
      • getRepresenter

        public String getRepresenter()
      • setRepresenter

        public void setRepresenter​(String representer)
        Representer to emit outgoing objects.
      • getDumperOptions

        public String getDumperOptions()
      • setDumperOptions

        public void setDumperOptions​(String dumperOptions)
        DumperOptions to configure outgoing objects.
      • getResolver

        public String getResolver()
      • setResolver

        public void setResolver​(String resolver)
        Resolver to detect implicit type
      • getUseApplicationContextClassLoader

        public String getUseApplicationContextClassLoader()
      • setUseApplicationContextClassLoader

        public void setUseApplicationContextClassLoader​(String useApplicationContextClassLoader)
        Use ApplicationContextClassLoader as custom ClassLoader
      • getPrettyFlow

        public String getPrettyFlow()
      • setPrettyFlow

        public void setPrettyFlow​(String prettyFlow)
        Force the emitter to produce a pretty YAML document when using the flow style.
      • getAllowAnyType

        public String getAllowAnyType()
      • setAllowAnyType

        public void setAllowAnyType​(String allowAnyType)
        Allow any class to be un-marshaled
      • setTypeFilters

        public void setTypeFilters​(List<YAMLTypeFilterDefinition> typeFilters)
        Set the types SnakeYAML is allowed to un-marshall
      • getMaxAliasesForCollections

        public String getMaxAliasesForCollections()
      • setMaxAliasesForCollections

        public void setMaxAliasesForCollections​(String maxAliasesForCollections)
        Set the maximum amount of aliases allowed for collections.
      • getAllowRecursiveKeys

        public String getAllowRecursiveKeys()
      • setAllowRecursiveKeys

        public void setAllowRecursiveKeys​(String allowRecursiveKeys)
        Set whether recursive keys are allowed.