ioutil.ReadAll() returns a []byte, which already represents the data in JSON 
form. You do not need to marshal it agian; in fact, you do not want to marshal 
it again, because then you'll get, as per encoding/json's documentation, the 
base64-encoded byte stream as a string, which is not right. Instead, use 
io.Copy() to slurp f into b directly and don't bother with encoding/json.
> On Oct 25, 2016, at 8:32 AM, Rich <rma...@gmail.com> wrote:
> 
> https://play.golang.org/p/NYV5SdCtnt <https://play.golang.org/p/NYV5SdCtnt>
> 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to