How to get a list with the Typesafe config library

前端 未结 4 1446
温柔的废话
温柔的废话 2020-12-28 12:35

I\'m trying in Scala to get a list from a config file like something.conf with TypeSafe.

In something.conf I set the parameter

4条回答
  •  鱼传尺愫
    2020-12-28 13:29

    You can try my scala wrapper https://github.com/andr83/scalaconfig - it supports reading native scala types directly from config object. In your case it will look:

    val myList = modifyConfig.as[List[String]]("mylist")
    

提交回复
热议问题