Hi,

This is not an easy task, I am not sure how to do it with built-in
combinators (you can do such custom stages but they are quite advanced and
we have not yet openly documented all APIs that is needed for these kind of
stages). But the largest issue will be that Source[A] and Source[B] will
not be independent, so you cannot read a single element from Source[B]
before you have read *all* the elements from Source[A] since your original
input is strictly sequential.

-Endre

On Wed, Feb 10, 2016 at 3:47 PM, Kyrylo Stokoz <k.sto...@gmail.com> wrote:

> Hi,
>
> I have an http server that accept post request where http entity is
> chuncked and can be quite big, basically entity is a json of the following
> format:
>
> {code}
>  {
>    "shortlist" : [ { serialized objA } ], // up to 100items
>    "verylonglist": [{serialized objB}], // up to ~5M
> }
> {code}
>
> I was thinking in to have something like this (
> https://github.com/knutwalker/akka-stream-json) to convert bytestring
> source into source[objA].
> Is there an easy/nice way how to create sources for every array in json?
> i.e split one Source[ByteString] into several Source[ObjA] and Source[ObjB]?
>
> Any suggestion welcome...
>
> Thanks,
> Kyrylo
>
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to