Skip to content

Instantly share code, notes, and snippets.

@choplin
Created September 8, 2014 07:51
Show Gist options
  • Save choplin/ad8c64203a918e80acf8 to your computer and use it in GitHub Desktop.
Save choplin/ad8c64203a918e80acf8 to your computer and use it in GitHub Desktop.
hocon to Properties
val conf = ConfigFactory.load()
conf.getConfig("foo.properties").entrySet.asScala.foldLeft(new Properties) { (p, e) =>
p.setProperty(e.getKey, e.getValue.unwrapped.toString)
p
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment