Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- byte[] encoded;
- try {
- encoded = Files.readAllBytes(Paths.get("d:\\eclipse\\workspace\\testYAML\\Invoice.yaml"));
- } catch (IOException e) {
- encoded = null;
- e.printStackTrace();
- }
- Charset encoding = StandardCharsets.UTF_8;
- String content = encoding.decode(ByteBuffer.wrap(encoded)).toString();
- System.out.println(content);
- Yaml yaml = new Yaml();
- Object o = yaml.load(content);
Advertisement
Add Comment
Please, Sign In to add comment