Skip to content

aclement/properties-to-yaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

properties-to-yaml

PropertiesToYamlConverter converter = new PropertiesToYamlConverter();
YamlConversionResult result = converter.convert(
  "a.b.c=1\n"+
  "a.b.d=2\n"
);
if (result.getSeverity() != ConversionStatus.OK) {
  throw new IllegalStateException("Problem during conversion: \n"+result.getStatus().getEntries());
}
System.out.println(result.getYaml());
String expected =
  "a:\n"+
  "  b:\n"+
  "    c: '1'\n"+
  "    d: '2'\n";
if (!result.getYaml().equals(expected)) {
  throw new IllegalStateException("Not expected result! "+result.getYaml());
}

About

Convert properties file to yaml structure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages