Search in sources :

Example 1 with DumperOptions

use of org.yaml.snakeyaml.DumperOptions in project Apktool by iBotPeaches.

the class MetaInfo method save.

public void save(Writer output) {
    DumperOptions options = new DumperOptions();
    options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
    getYaml().dump(this, output);
}
Also used : DumperOptions(org.yaml.snakeyaml.DumperOptions)

Example 2 with DumperOptions

use of org.yaml.snakeyaml.DumperOptions in project pinot by linkedin.

the class PerfBenchmarkDriverConf method main.

public static void main(String[] args) {
    DumperOptions options = new DumperOptions();
    options.setIndent(4);
    options.setDefaultFlowStyle(FlowStyle.BLOCK);
    Yaml yaml = new Yaml(options);
    String dump = yaml.dump(new PerfBenchmarkDriverConf());
    System.out.println(dump);
}
Also used : DumperOptions(org.yaml.snakeyaml.DumperOptions) Yaml(org.yaml.snakeyaml.Yaml)

Example 3 with DumperOptions

use of org.yaml.snakeyaml.DumperOptions in project spring-boot by spring-projects.

the class OriginTrackedYamlLoader method createYaml.

@Override
protected Yaml createYaml() {
    BaseConstructor constructor = new OriginTrackingConstructor();
    Representer representer = new Representer();
    DumperOptions dumperOptions = new DumperOptions();
    LimitedResolver resolver = new LimitedResolver();
    return new Yaml(constructor, representer, dumperOptions, resolver);
}
Also used : BaseConstructor(org.yaml.snakeyaml.constructor.BaseConstructor) Representer(org.yaml.snakeyaml.representer.Representer) DumperOptions(org.yaml.snakeyaml.DumperOptions) Yaml(org.yaml.snakeyaml.Yaml)

Example 4 with DumperOptions

use of org.yaml.snakeyaml.DumperOptions in project camel by apache.

the class SnakeYAMLDataFormat method defaultDumperOptions.

private DumperOptions defaultDumperOptions(CamelContext context) {
    DumperOptions yamlDumperOptions = new DumperOptions();
    yamlDumperOptions.setPrettyFlow(prettyFlow);
    return yamlDumperOptions;
}
Also used : DumperOptions(org.yaml.snakeyaml.DumperOptions)

Example 5 with DumperOptions

use of org.yaml.snakeyaml.DumperOptions in project liquibase by liquibase.

the class YamlSerializer method createYaml.

protected Yaml createYaml() {
    if (isJson()) {
        DumperOptions dumperOptions = new DumperOptions();
        dumperOptions.setPrettyFlow(true);
        dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.FLOW);
        dumperOptions.setDefaultScalarStyle(DumperOptions.ScalarStyle.DOUBLE_QUOTED);
        dumperOptions.setWidth(Integer.MAX_VALUE);
        return new Yaml(getLiquibaseRepresenter(), dumperOptions);
    }
    DumperOptions dumperOptions = new DumperOptions();
    dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
    return new Yaml(getLiquibaseRepresenter(), dumperOptions);
}
Also used : DumperOptions(org.yaml.snakeyaml.DumperOptions) Yaml(org.yaml.snakeyaml.Yaml)

Aggregations

DumperOptions (org.yaml.snakeyaml.DumperOptions)11 Yaml (org.yaml.snakeyaml.Yaml)9 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 DefaultMustacheFactory (com.github.mustachejava.DefaultMustacheFactory)2 Mustache (com.github.mustachejava.Mustache)2 MustacheFactory (com.github.mustachejava.MustacheFactory)2 ImmutableMap (com.google.common.collect.ImmutableMap)2 BufferedWriter (java.io.BufferedWriter)2 File (java.io.File)2 FileWriter (java.io.FileWriter)2 StringWriter (java.io.StringWriter)2 Writer (java.io.Writer)2 AutoValue (com.google.auto.value.AutoValue)1 Multimaps (com.google.common.collect.Multimaps)1 SortedSetMultimap (com.google.common.collect.SortedSetMultimap)1 TreeMultimap (com.google.common.collect.TreeMultimap)1 SeverityLevel (com.google.errorprone.BugPattern.SeverityLevel)1 Target (com.google.errorprone.DocGenTool.Target)1