YAML Multi-Line Arrays

后端 未结 5 2053
闹比i
闹比i 2020-12-04 13:35

In YAML, you can easily create multi-line strings. However, I would like the ability to create a multi-line array (mainly for readibility within config files) using the

5条回答
  •  旧巷少年郎
    2020-12-04 14:25

    The following would work:

    myarray: [
      String1, String2, String3,
      String4, String5, String5, String7
    ]
    

    I tested it using the snakeyaml implementation, I am not sure about other implementations though.

提交回复
热议问题