amnaredo / test

0 stars 0 forks source link

Obtaining parse tree #44

Open amnaredo opened 3 years ago

amnaredo commented 3 years ago

The following fails with an expansion error:

upickle.read[Js.Arr](contents)

I came up with a quick workaround, but I'd prefer if the above line worked:

case class Tree(tree: Js.Arr)
implicit val treeReader = upickle.Reader[Tree] {
  case t: Js.Arr => Tree(t)
}

upickle.read[Tree](contents)

ID: 56 Original Author: tindzk