Reading Json file from s3 and want to keep all values in-memory structure.

1,110 views
Skip to first unread message

hunt

unread,
Mar 27, 2017, 3:17:05 PM3/27/17
to golang-nuts
Hi,

Just wanted to know how can i achieve this.

Christian Joergensen

unread,
Mar 28, 2017, 6:23:02 AM3/28/17
to golang-nuts
On Monday, March 27, 2017 at 9:17:05 PM UTC+2, hunt wrote:
Just wanted to know how can i achieve this.

What did you try?

Take a look at his function:

The Body attribute of the resulting GetObjectOutput struct can be passed to json.NewDecoder:

This will stream the data directly from S3 to the json decoder and your data shouldn't hit the disk.

Cheers,

Christian

Christian Joergensen

unread,
Mar 28, 2017, 8:23:10 AM3/28/17
to golang-nuts
On Tuesday, March 28, 2017 at 12:23:02 PM UTC+2, Christian Joergensen wrote:

Correction; I meant this function:

Cheers,

Christian
Reply all
Reply to author
Forward
0 new messages