Parse a YAML file

前端 未结 3 839
半阙折子戏
半阙折子戏 2020-11-27 06:53

This is the first time I am working with YAML files, so the first think I looked at was to find any library that could help me to parse the file.

I have found two li

3条回答
  •  余生分开走
    2020-11-27 07:37

    I ended up using SnakeYaml and made some split strings to solve my issue.

    Loaded the yaml file to Object and then into a Map, then split the result from the Map into String[] and then in a for loop I read out the name from the String[]. I did the same with groups.

    I know that there is better solutions out there but this is good enough for this project.

    Thanks all for the replies.

提交回复
热议问题