Bug fixes to JSON support.
Added scala.Option support.