// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package yamlproc;

import java.io.FileInputStream;
import java.io.IOException;

import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;

public class SnakeBindTagAlt1 {
    public static void main(String[] args) throws IOException {
        Yaml parser = new Yaml(new SafeConstructor());
        Config cfg = (Config)parser.load(new FileInputStream("/work/demo2snake.yaml"));
        int a = cfg.getAb().getA();
        int b = cfg.getAb().getB();
        int c = cfg.getC();
        String d = cfg.getDe().getD();
        String e = cfg.getDe().getE();
        String f = cfg.getF();
        System.out.printf("%d %d %d %s %s %s\n", a, b, c, d, e, f);
    }
}
