In scala and circe, given Json objects as follows
import io.circe._
import io.circe.syntax._
val x: Json = Json.fromString("foo")
val y: Json = List(1, 2, 3).asJson
I would like to divise a way to detect if the content of x is a really a String literal (which is the case, "foo") while y is not (its a list). Any hints ?
Or just:
x.isString,y.isString.