Skip to content

Commit

Permalink
Remove null fields from result
Browse files Browse the repository at this point in the history
  • Loading branch information
cencarnacion committed Jun 2, 2014
1 parent a64450e commit 6b2ab1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion play-gjson/src/main/scala/JSONPickler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ object JSONPickler {
val o = Json.obj(name -> hjp.pickle(l.head:V))
tjp.pickle(l.tail) match {
case a: JsArray => Json.arr(o) ++ a
case x => o ++ x.asInstanceOf[JsObject]
case x => JsObject((o ++ x.asInstanceOf[JsObject]).fields.filter(_._2 != JsNull))
}
}
def unpickle(v: JsValue, path: List[String]): String \/ (FieldType[F, V] :: T) = for {
Expand Down

0 comments on commit 6b2ab1b

Please sign in to comment.