Case Class could not find implicit encoder when Scala Collection is turned into Java One
See original GitHub issueHello everyone.
I am trying to parse a Json with a model based on this case class
case class MyCaseClass(field: String, collection: Vector[String])
Everything is fine but I’d prefer using this version.
case class MyCaseClass(field: String, collection: java.util.Collection[String])
As soon as I turn to this version, I get
Information:10/16/19 5:24 PM - Compilation completed with 2 errors and 0 warnings in 3 s 99 ms
Error:Error:line (33)could not find implicit value for parameter d: io.circe.Decoder[models.MyCaseClass]
...
Error:Error:line (33)not enough arguments for method as: (implicit d: io.circe.Decoder[models.MyCaseClass])io.circe.Decoder.Result[models.MyCaseClass].
Unspecified value parameter d.
...
Is it wrong using Java Collections with Circe?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
scala could not find implicit value for parameter encoder
This works: import io.circe._ import io.circe.generic.auto._ import io.circe.syntax._ scala> Map("key" -> "hello".asJson, "boolean" -> true.
Read more >circe/circe - Gitter
I am using circe in a Flink project and I got an issue with the built-in Encoder for TraversableOnce as sadly Flink relies...
Read more >Getting Started - Spark 3.3.1 Documentation
Programmatically Specifying the Schema. Scala; Java; Python. When case classes cannot be defined ahead of time ( ...
Read more >Custom Mappings · doobie - tpolecat
single -element case classes wrapping one of the above types. The java.time instances may require a separate import , dependent on your Database...
Read more >Serializers for Classes in Datasets - FullContact
These implicit values make it possible for the Dataset to have the necessary Encoder for a type the Dataset did not know existed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@alessandrolumino why not just use a Scala library for serialization to Avro?
https://github.com/topics/avro?l=scala
By the way, I used avro4s!