Skip to content

Instantly share code, notes, and snippets.

@tkellogg
Created October 22, 2013 20:18
Show Gist options
  • Save tkellogg/7107431 to your computer and use it in GitHub Desktop.
Save tkellogg/7107431 to your computer and use it in GitHub Desktop.
case class Fail(text: Option[String])
object Main extends App {
import org.json4s._
import org.json4s.native.Serialization
import org.json4s.native.Serialization.{read, write}
implicit val formats = org.json4s.DefaultFormats
read[Fail]("""{"notext":"foo"}""").text match {
case Some(txt) => // ClassCastException here when using json4s v3.1.0
case None =>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment