Created
October 24, 2016 07:43
-
-
Save 2m/ef0a45915f6ef9dbdcb5b47509ea14f2 to your computer and use it in GitHub Desktop.
Config with colon in key names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~ amm | |
Loading... | |
Welcome to the Ammonite Repl 0.7.6 | |
(Scala 2.11.8 Java 1.8.0_112) | |
@ import $ivy.`com.typesafe:config:1.3.1` | |
import $ivy.$ | |
@ import com.typesafe.config.ConfigFactory | |
import com.typesafe.config.ConfigFactory | |
@ ConfigFactory.parseString(""" | |
services: { | |
FOO"::"BAR"::"BAZ: { | |
enabled: true | |
} | |
} | |
""") | |
res2: com.typesafe.config.Config = Config(SimpleConfigObject({"services":{"FOO::BAR::BAZ":{"enabled":true}}})) | |
@ res2.getBoolean("""services.FOO"::"BAR"::"BAZ.enabled""") | |
res3: Boolean = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment