Member-only story

Go

Parse Json file to data structure

in Go.

Donald Le

--

Photo by jet dela cruz on Unsplash

For example we have json file like:

This is the list of gene objects which consist “seqid”, “start”, “end”, “gene_name”.

To parse the json, simply use with json.Unmarshal and parse from the gene object.

Running main file will print the gene name:

U6
AC136352.3
AC136352.2
U6
AC171558.3
AC171558.1
AC171558.4
AC133551.1

Thanks for reading my post.

~~~PEACE~~~

--

--

No responses yet