Type class that defines method for reading a value of type T from a Typesafe Config key
Adds Scala-friendly methods to a com.typesafe.config.Config instance:
Adds Scala-friendly methods to a com.typesafe.config.Config instance:
Examples:
import org.allenai.common.Config._ val config = ConfigFactory.load() val requiredConfigValue: String = config[String]("required.key") val optionalConfigValue: Option[URI] = config.get[URI]("optional.key")
Renders JSON on compact (no whitespace) format
Renders JSON formatted
Import to provide enhancements via implicit class conversion for making working with com.typesafe.config.Config more Scala-friendly (no nulls!).
Also provides a
spray.json.RootJsonFormat[Config]
.