mdedetrich / akka-streams-json

@@ -18,7 +18,7 @@
Loading
18 18
    circeJsonUnmarshaller.map(CirceStreamSupport.decodeJson[A])
19 19
20 20
  implicit def circeJsonMarshaller(implicit P: Printer = Printer.noSpaces): ToEntityMarshaller[Json] =
21 -
    Marshaller.StringMarshaller.wrap(`application/json`)(P.pretty)
21 +
    Marshaller.StringMarshaller.wrap(`application/json`)(P.print)
22 22
23 23
  implicit def circeMarshaller[A](implicit A: Encoder[A], P: Printer = Printer.noSpaces): ToEntityMarshaller[A] =
24 24
    circeJsonMarshaller.compose(A.apply)

@@ -53,8 +53,8 @@
Loading
53 53
    private[this] val scratch = new ArrayBuffer[J](64)
54 54
55 55
    setHandler(out, new OutHandler {
56 -
      override def onPull(): Unit             = pull(in)
57 -
      override def onDownstreamFinish(): Unit = downstreamFinish()
56 +
      override def onPull(): Unit                                 = pull(in)
57 +
      override def onDownstreamFinish(throwable: Throwable): Unit = downstreamFinish()
58 58
    })
59 59
    setHandler(in, new InHandler {
60 60
      override def onPush(): Unit           = upstreamPush()
@@ -102,8 +102,7 @@
Loading
102 102
  }
103 103
}
104 104
105 -
final class JsonStreamParser[J: Facade] private (mode: AsyncParser.Mode)
106 -
    extends GraphStage[FlowShape[ByteString, J]] {
105 +
final class JsonStreamParser[J: Facade] private (mode: AsyncParser.Mode) extends GraphStage[FlowShape[ByteString, J]] {
107 106
  private[this] val in  = Inlet[ByteString]("Json.in")
108 107
  private[this] val out = Outlet[J]("Json.out")
109 108
  override val shape    = FlowShape(in, out)

@@ -19,7 +19,7 @@
Loading
19 19
    JsonStreamParser.flow[Json](mode).map(decodeJson[A])
20 20
21 21
  def encode[A](implicit A: Encoder[A], P: Printer = Printer.noSpaces): Flow[A, String, NotUsed] =
22 -
    Flow[A].map(a => P.pretty(A(a)))
22 +
    Flow[A].map(a => P.print(A(a)))
23 23
24 24
  case class JsonParsingException(df: DecodingFailure, cursor: HCursor)
25 25
      extends Exception(errorMessage(df.history, cursor, df.message), df)
Files Coverage
support 82.35%
http-json/src/main/scala/org/mdedetrich/akka/http/JsonSupport.scala 100.00%
...-json/src/main/scala/org/mdedetrich/akka/json/stream/JsonStreamParser.scala 85.71%
Project Totals (4 files) 85.71%
39.1
TRAVIS_OS_NAME=linux
openjdk8=

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading