knutwalker / akka-stream-json

Apache License 2.0
28 stars 14 forks source link

Support for JSON EntityStreamingSupport and example needed #5

Closed schrepfler closed 8 years ago

schrepfler commented 8 years ago

It's not clear to me if akka-stream-json can be used together with Source Streaming/JSON streaming as documented by http://doc.akka.io/docs/akka/2.4/scala/http/routing-dsl/source-streaming-support.html. In particular I don't understand if the framing done by akka-stream-json can work together with EntityStreamingSupport.json() (and the configuration of it) or is the framing done explicitly by akka-stream-json? I think an example with a web socket client which opens a connection and streams entities would be useful to illustrate concretely the API's use, either with a concrete case class object or a general Json object, especially as there are not many example around (example, let's not just do the canonical Sink.foreach(println), can the example illustrate working with the case class)?

knutwalker commented 8 years ago

This is a new feature that was introduced in 2.4.9, I haven't even checked it out by myself yet. From a quick look at the docs and code, it seems like EntityStreamingSupport.json() provides basically the same functionality as this project, with the following differences:

So, I don't think you can profit from combining these two options but have to choose one over the other. I agree though, that this project can do with some more examples.

schrepfler commented 8 years ago

I see, that would make sense. I guess we can close this ticket if the feature super-seeds it.