many thanks.

On Wednesday, December 2, 2015 at 12:20:12 PM UTC-8, alb.do...@gmail.com
It's a known problem.
Se discussion on https://github.com/golang/go/issues/7872

On Wednesday, December 2, 2015 at 8:48:02 PM UTC+1, Travis Keep wrote:

Just curious, is there an architectural reason that the JSON encoder is
not streaming?
On Wednesday, December 2, 2015 at 11:40:18 AM UTC-8, Caleb Spare wrote:

I am writing this post because it seems that the GO JSON encoder is
not a truly streaming encoder.

No it isn't, nor does it claim to be (that I can find).

The encoder marshals (and buffers) an entire object at a time. If you
have a slice of 10k items you want to send as a JSON array, you can do
the array encoding yourself: send a "[", then encode each item with a
"," in between, then a final "]".


You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 7 | next ›
Discussion Overview
groupgolang-nuts @
postedDec 2, '15 at 7:09p
activeDec 4, '15 at 3:17a



site design / logo © 2022 Grokbase