izharahmd / hocon-exts

Scala extensions for HOCON.

Version Matrix

hocon-exts

Build Status codecov Maven Central

Scala extensions for HOCON.

Getting started

libraryDependencies += "io.github.izharahmed" %% "hocon-exts" % "0.1.0"

Usage

import io.github.izharahmd.hoconexts.Extensions._

scala> val config = """ {"a": "b"} """.toConfig
val config: com.typesafe.config.Config = Config(SimpleConfigObject({"a":"b"}))

scala> config.getStringOption("a")
val res3: Option[String] = Some(b)

scala> config.getStringOption("x")
val res4: Option[String] = None