--- a/src/main/scala/CouchStream.scala Thu Nov 19 19:08:18 2015 +0100
+++ b/src/main/scala/CouchStream.scala Thu May 05 16:26:07 2016 +0200
@@ -23,9 +23,10 @@
import DefaultJsonProtocol._
implicit val changesFormat = jsonFormat3(ResultRow)
- def apply(entity: HttpEntity): Deserialized[ResultRow] = (Try {
- Right(JsonParser(entity.asString).asJsObject.convertTo[ResultRow])
- }).getOrElse(Left(MalformedContent("bad json")))
+ def apply(entity: HttpEntity): Deserialized[ResultRow] = Try {
+ Right(JsonParser(entity.asString(HttpCharsets.`UTF-8`)).asJsObject.
+ convertTo[ResultRow])
+ } getOrElse Left(MalformedContent("bad json"))
}
}