lift-json flattens option types unexpectedly
When parsing case classes with a List of Option[String], the option
classes get flatten out.
For case class Library(name:String, docs:List[Option[String]])
when I parse and extract it, i get:
but I expect:
The test unit is at https://gist.github.com/1077437
Is this the expected behavior or a bug in lift-json 2.4M1?
Joni Freeman states: " extracted type must be the same type as given to the extract function"
http://groups.google.com/group/liftweb/browse_thread/thread/fb40cea9ebecbf49#
classes get flatten out.
For case class Library(name:String, docs:List[Option[String]])
when I parse and extract it, i get:
Library(test,List(1, 2))
but I expect:
Library(test,List(Some(1), Some(2)))
The test unit is at https://gist.github.com/1077437
Is this the expected behavior or a bug in lift-json 2.4M1?
Joni Freeman states: " extracted type must be the same type as given to the extract function"
http://groups.google.com/group/liftweb/browse_thread/thread/fb40cea9ebecbf49#
Leave a comment