Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

stream json handler

  • Loading branch information...
commit 1e36df4f4ed60e5de365f2eac676918e5b74370d 1 parent 148f042
@softprops softprops authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 liftjson/src/main/scala/as/stream/json.scala
View
14 liftjson/src/main/scala/as/stream/json.scala
@@ -0,0 +1,14 @@
+package dispatch.as.lift.stream
+
+import dispatch.stream.StringsByLine
+import net.liftweb.json.{ JsonParser, JValue }
+
+object Json {
+ def apply[T](f: JValue => T) =
+ new StringsByLine[Unit] {
+ def onStringBy(string: String) {
+ f(JsonParser.parse(string))
+ }
+ def onCompleted = ()
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.