开发者

Walkthrough of SnakeYAML in Java

开发者 https://www.devze.com 2023-03-09 21:09 出处:网络
I need to read some values and variables from a .yml file开发者_开发技巧 and thats it, write them to a String and thats all I need? How would I do this?Yaml yaml = new Yaml();

I need to read some values and variables from a .yml file开发者_开发技巧 and thats it, write them to a String and thats all I need? How would I do this?


Yaml yaml = new Yaml();
Map<String, Object> config = (Map<String, Object>) yaml.load("Your input");

"Your input" can be InputStream, Reader or String.

0

精彩评论

暂无评论...
验证码 换一张
取 消