https://github.com/evolution-gaming/config-tools
Typesafe config helpers
https://github.com/evolution-gaming/config-tools
config scala
Last synced: 6 months ago
JSON representation
Typesafe config helpers
- Host: GitHub
- URL: https://github.com/evolution-gaming/config-tools
- Owner: evolution-gaming
- License: mit
- Created: 2018-02-11T13:08:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-18T10:35:01.000Z (almost 2 years ago)
- Last Synced: 2025-01-23T17:44:28.318Z (over 1 year ago)
- Topics: config, scala
- Language: Scala
- Size: 22.5 KB
- Stars: 2
- Watchers: 13
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Config tools [](https://github.com/evolution-gaming/config-tools/actions?query=workflow%3ACI) [](https://coveralls.io/r/evolution-gaming/config-tools) [](https://app.codacy.com/gh/evolution-gaming/config-tools/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://evolution.jfrog.io/artifactory/api/search/latestVersion?g=com.evolutiongaming&a=config-tools_2.13&repos=public) [](https://opensource.org/licenses/MIT)
## ConfigHelper.scala example
```scala
import com.evolutiongaming.config.ConfigHelper._
val config = ConfigFactory.load()
config.get[FiniteDuration]("path") // FiniteDuration
config.getOpt[FiniteDuration]("path") // Option[FiniteDuration]
config.get[String]("path") // String
ConfigFactory.parseString("key:[1,2]").get[List[Int]]("key") // List(1,2)
ConfigFactory.parseString("""key:"1,2" """).get[List[Int]]("key") // List(1,2)
ConfigFactory.parseString("""key:"1;2" """).get[List[Int]]("key") // List(1,2)
```
## Setup
```scala
resolvers += Resolver.bintrayRepo("evolutiongaming", "maven")
libraryDependencies += "com.evolutiongaming" %% "config-tools" % "1.0.0"
```