final case class Stuff(metadata: Option[String]) {
val metadataJson: JObject = parse(metadata.getOrElse("{}")).asInstanceOf[JObject]
}
This throws a type mismatch error
found: Object
required: JsonInput
But it shouldnt happen since metadata.getOrElse.. should be type String which is casted to JsonInput