-
Hello, how can I transform a Node to Any? I am getting error val l = "1".asNode
val r = l.map(as[Any])
no implicit argument of type org.virtuslab.yaml.LoadSettings was found for parameter settings of method as in trait Node
rendered.map(_.as[Any]) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @gilcu2! I created some reproduction using scala-cli (I really encourage you to take at look at this tool!) //> using scala "3.1.1"
//> using lib "org.virtuslab::scala-yaml:0.0.4"
//> using lib "com.lihaoyi::pprint:0.7.3"
import org.virtuslab.yaml.*
object Yaml extends App {
val node = "1".asNode
val any = node.map(_.as[Any])
pprint.log(node)
pprint.log(any)
} and it seems like it works. Gist with code is here and you could run it via |
Beta Was this translation helpful? Give feedback.
-
ThisBuild / scalaVersion := "3.1.1" lazy val root = (project in file(".")) libraryDependencies ++= Seq( "org.virtuslab" %% "scala-yaml" % "0.0.4" Which scala version, package version are you using? |
Beta Was this translation helpful? Give feedback.
Hi @gilcu2!
Which version of lib do you use?
I created some reproduction using scala-cli (I really encourage you to take at look at this tool!)
and it seems like it works. Gist with code is here and you could run it via
scala-cli run https://gist.github.com/kpodsiad/d9ee4bfbf7303518dd3959775fe8f6f8
command, provided that you've installed scala-cli.