• Home
  • Raw
  • Download

Lines Matching full:yaml

21 import org.yaml.snakeyaml.DumperOptions;
22 import org.yaml.snakeyaml.Yaml;
23 import org.yaml.snakeyaml.constructor.AbstractConstruct;
24 import org.yaml.snakeyaml.constructor.Constructor;
25 import org.yaml.snakeyaml.nodes.Node;
26 import org.yaml.snakeyaml.nodes.ScalarNode;
27 import org.yaml.snakeyaml.nodes.Tag;
28 import org.yaml.snakeyaml.representer.Represent;
29 import org.yaml.snakeyaml.representer.Representer;
37 Yaml yaml = new Yaml(options); in testRepresenter() local
38 String output = yaml.dump(dice); in testRepresenter()
46 Yaml yaml = new Yaml(new DiceRepresenter(), new DumperOptions()); in testDiceRepresenter() local
47 String output = yaml.dump(data); in testDiceRepresenter()
87 Yaml yaml = new Yaml(new DiceConstructor()); in testConstructor() local
88 Object data = yaml.load("{initial hit points: !dice '8d4'}"); in testConstructor()
96 Yaml yaml = new Yaml(new DiceConstructor(), new DiceRepresenter()); in testImplicitResolver() local
98 yaml.addImplicitResolver(new Tag("!dice"), Pattern.compile("\\d+d\\d+"), "123456789"); in testImplicitResolver()
102 String output = yaml.dump(treasure); in testImplicitResolver()
105 Object data = yaml.load("{damage: 5d10}"); in testImplicitResolver()
113 Yaml yaml = new Yaml(new DiceConstructor(), new DiceRepresenter()); in testImplicitResolverWithNull() local
115 yaml.addImplicitResolver(new Tag("!dice"), Pattern.compile("\\d+d\\d+"), null); in testImplicitResolverWithNull()
119 String output = yaml.dump(treasure); in testImplicitResolverWithNull()
122 Object data = yaml.load("{damage: 5d10}"); in testImplicitResolverWithNull()
151 Yaml yaml = new Yaml(new DiceConstructor(), new DiceRepresenter()); in testImplicitResolverJavaBean() local
153 yaml.addImplicitResolver(new Tag("!dice"), Pattern.compile("\\d+d\\d+"), "123456789"); in testImplicitResolverJavaBean()
157 String output = yaml.dump(bean); in testImplicitResolverJavaBean()
160 Object loaded = yaml.load(output); in testImplicitResolverJavaBean()