philippus / pureconfig-javanet   0.0.2

Mozilla Public License 2.0 GitHub

⚙️ PureConfig module for

Scala versions: 2.13


build codecov Current Version license

pureconfig-javanet is a PureConfig module that supplies readers and writers that turn a host:port pair into a InetSocketAddress and turn a list of host:port pairs, separated by a comma, into a Seq[InetSocketAddress]. It supports IPv4 and IPv6 addresses and host names in the following shapes:
[2001:db8::1]:80, localhost:80

To stay pure the InetSocketAddress is constructed using the createUnresolved-method, and thus will be flagged as unresolved, see


pureconfig-javanet is published for Scala 2.13. To start using it add the following to your build.sbt:

libraryDependencies += "nl.gn0s1s" %% "pureconfig-javanet" % "0.0.2"

PureConfig itself also needs to be added as a dependency to your project.

Example usage


  import com.typesafe.config.ConfigFactory.parseString
  import nl.gn0s1s.pureconfig.module.javanet._
  import pureconfig.syntax._

  case class Config(host: InetSocketAddress)

  val conf = parseString(""""host": """"") // val conf: com.typesafe.config.Config = Config(SimpleConfigObject({"host":""}))[Config] // val res0: pureconfig.ConfigReader.Result[Config] = Right(Config(


The code is available under the Mozilla Public License, version 2.0.