Skip to content

Commit

Permalink
Workaround for issue lift#1169
Browse files Browse the repository at this point in the history
  • Loading branch information
Joni Freeman committed Feb 28, 2012
1 parent 23d98a8 commit 42ca1b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/json/src/main/scala/net/liftweb/json/ScalaSig.scala
Expand Up @@ -65,6 +65,7 @@ private[json] object ScalaSigReader {
case TypeRefType(ThisType(_), symbol, _) if isPrimitive(symbol) => symbol
case TypeRefType(_, _, TypeRefType(ThisType(_), symbol, _) :: xs) => symbol
case TypeRefType(_, symbol, Nil) => symbol
case TypeRefType(_, _, args) if typeArgIndex >= args.length => findPrimitive(args(0))
case TypeRefType(_, _, args) =>
args(typeArgIndex) match {
case ref @ TypeRefType(_, _, _) => findPrimitive(ref)
Expand Down
Expand Up @@ -52,6 +52,13 @@ object ExtractionBugs extends Specification("Extraction bugs Specification") {
parse("""{"nums":[10]}""").extract[HasCompanion] mustEqual HasCompanion(List(10))
}

"Issue 1169" in {
val json = JsonParser.parse("""{"data":[{"one":1, "two":2}]}""")
json.extract[Response] mustEqual Response(List(Map("one" -> 1, "two" -> 2)))
}

case class Response(data: List[Map[String, Int]])

case class OptionOfInt(opt: Option[Int])

case class PMap(m: Map[String, List[String]])
Expand Down

0 comments on commit 42ca1b1

Please sign in to comment.