Not sure why ivy imports are marked red, but everything works fine 👍
Created
June 26, 2024 03:29
-
-
Save tanishiking/535bdee335bd5e13e84dbf5f425ba818 to your computer and use it in GitHub Desktop.
amm-intellij-example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ivy.`io.circe::circe-core:0.14.5` | |
import $ivy.`io.circe::circe-parser:0.14.5` | |
import $ivy.`io.circe::circe-generic:0.14.5` | |
import io.circe._, io.circe.generic.auto._, io.circe.parser._, io.circe.syntax._ | |
sealed trait Foo | |
case class Bar(xs: Vector[String]) extends Foo | |
case class Qux(i: Int, d: Option[Double]) extends Foo | |
@main | |
def main(thing: String = "World"): Unit = { | |
val foo: Foo = Qux(13, Some(14.0)) | |
val json = foo.asJson.noSpaces | |
pprint.pprintln(json) | |
val decodedFoo = decode[Foo](json) | |
pprint.pprintln(decodedFoo) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment