Option[T]
work as you expect.
None
corresponds to JSON's null
.
Note that you need a JsonRW[T]
given instance.
Option.empty[String].toJson
// null
Option("str").toJson
// "str"
""" null """.parseJson[Option[String]]
// None
""" "str" """.parseJson[Option[String]]
// Some(str)