@Test(expected = YAMLException.class) public void verifyDuplicateKeysDisallowed() throws Exception { loader.loadString("{\"a\":1, \"a\":2}"); }
public ConfigElement loadString(String content) throws IOException { Yaml yaml = new Yaml(new StrictSafeConstructor(), new Representer(), new DumperOptions(), new YamlTagResolver()); ObjectNode object = normalizeValidateObjectNode(yaml.load(content)); return ConfigElement.of(object); }
YamlConfigLoader { public ConfigElement loadString(String content) throws IOException { Yaml yaml = new Yaml(new StrictSafeConstructor(), new Representer(), new DumperOptions(), new YamlTagResolver()); ObjectNode object = normalizeValidateObjectNode(yaml.load(content)); return ConfigElement.of(object); } }
YamlConfigLoader { public ConfigElement loadString(String content) throws IOException { Yaml yaml = new Yaml(new StrictSafeConstructor(), new Representer(), new DumperOptions(), new YamlTagResolver()); ObjectNode object = normalizeValidateObjectNode(yaml.load(content)); return ConfigElement.of(object); } @Inject  YamlConfigLoader(); }
YamlConfigLoader { public ConfigElement loadString(String content) throws IOException { Yaml yaml = new Yaml(new StrictSafeConstructor(), new Representer(), new DumperOptions(), new YamlTagResolver()); ObjectNode object = normalizeValidateObjectNode(yaml.load(content)); return ConfigElement.of(object); } @Inject  YamlConfigLoader(); ConfigElement loadFile(File file); ConfigElement loadString(String content); ConfigElement loadParameterizedFile(File file, Config params); }
YamlConfigLoader { public ConfigElement loadString(String content) throws IOException { Yaml yaml = new Yaml(new StrictSafeConstructor(), new Representer(), new DumperOptions(), new YamlTagResolver()); ObjectNode object = normalizeValidateObjectNode(yaml.load(content)); return ConfigElement.of(object); } @Inject  YamlConfigLoader(); ConfigElement loadFile(File file); ConfigElement loadString(String content); ConfigElement loadParameterizedFile(File file, Config params);  }