Re: [go-nuts] JSON stream parsing help

2020-07-25 Thread Amnon BC
Awesome, thanks! On Sat, Jul 25, 2020 at 3:50 PM burak serdar wrote: > On Sat, Jul 25, 2020 at 6:09 AM Amnon wrote: > > > > Hi, > > > > I need to consume a stream of json objects. > > But unfortunately the json objects are separated by commas. > > > > Is there any simple way I can convince the

Re: [go-nuts] JSON stream parsing help

2020-07-25 Thread burak serdar
On Sat, Jul 25, 2020 at 6:09 AM Amnon wrote: > > Hi, > > I need to consume a stream of json objects. > But unfortunately the json objects are separated by commas. > > Is there any simple way I can convince the json.Decorder to skip the comma > after each successful call to decode? You have to re

[go-nuts] JSON stream parsing help

2020-07-25 Thread Amnon
Hi, I need to consume a stream of json objects. But unfortunately the json objects are separated by commas. Is there any simple way I can convince the json.Decorder to skip the comma after each successful call to decode? My code looks like for { var a st err := dec.Decode(&a) if err == io.EOF