Hi I'm trying using kinesis firehose with S3. And I tried to read those s3 files. I'm using GO to read it.
However, I can't parse the JSON because the values are only appending without any delimiter.
here's the example of the file (note that the original input is appending to each other, I split them by a newline for formatting purposes):
{"ticker_symbol":"PLM","sector":"FINANCIAL","change":-0.16,"price":19.99}
{"ticker_symbol":"AZL","sector":"HEALTHCARE","change":-0.78,"price":16.51}
{"ticker_symbol":"IOP","sector":"TECHNOLOGY","change":-1.98,"price":121.88}
{"ticker_symbol":"VVY","sector":"HEALTHCARE","change":-0.56,"price":47.62}
{"ticker_symbol":"BFH","sector":"RETAIL","change":0.74,"price":16.61}
{"ticker_symbol":"WAS","sector":"RETAIL","change":-0.6,"price":16.72}
my question is, how can I parse it in Go? one solution that I can think of is to split them by }{
and append them again. But it's pretty hackish.
Or does kinesis firehose provides delimiter?
------UPDATE------
currently I have implemented the solution with replacing all }{
with },{
and then add [
at the beginning and ]
at the end. Then parse it.
However I'm still looking for alternatives as this solution would restrict any }{
in the content of the json object