Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List is not loadable #195

Open
ohechtl opened this issue Feb 16, 2021 · 0 comments
Open

List is not loadable #195

ohechtl opened this issue Feb 16, 2021 · 0 comments

Comments

@ohechtl
Copy link

ohechtl commented Feb 16, 2021

This simple example fails to parse:

import com.typesafe.config.ConfigFactory

import io.circe.config.syntax._
import io.circe.generic.auto._
import cats.implicits._

object bug extends App {
  val config = ConfigFactory.parseString("asd: [{k: 1},{k: 2},{k: 3}]")

  case class f(k: Int)

  println(
    config.as[List[f]]("asd")
  )
}

This outputs:
Left(io.circe.ParsingFailure: String: 1: asd has type LIST rather than OBJECT)

I suppose the problem arises from that the lib expects a config object rather than anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant