Marten: Ability to stream json data directly to another stream

Created on 25 Oct 2016  路  6Comments  路  Source: JasperFx/marten

For the case where all you want to do is get some results from the server as JSON and send it down to an HTTP response. Skip the JSON string altogether and just copy bytes from one stream to another.

enhancement

Most helpful comment

Curious if GraphQL is still in the works as mentioned here: https://jeremydmiller.com/2018/06/07/planning-the-next-couple-marten-releases/

Note that this blog post references #585

All 6 comments

Think this is going to have to be in 2.0

Cool idea. It would be nice to do it for milestone 4.0 imho.

Curious if GraphQL is still in the works as mentioned here: https://jeremydmiller.com/2018/06/07/planning-the-next-couple-marten-releases/

Note that this blog post references #585

Has there been any thought on the API to get the streaming option? Like .Streaming() at the end of a query?

There would still be a need to convert stream to UTF8 since jsonb isn't stored in that encoding.

@Miggleness The serializer shouldn't have to get involved at all. It should be Npgsql's streaming support effectively pushing bytes directly to the HttpResponse.Body. There's gonna be some hiccups maybe if we need to strip out some serializer specific noise, but we'll have to cross that bridge when we get to it

I'll find time to play around with it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gcox picture gcox  路  3Comments

kamranayub picture kamranayub  路  7Comments

lahma picture lahma  路  4Comments

siberianguy picture siberianguy  路  7Comments

jokokko picture jokokko  路  9Comments