For JSON responses, is it more appropriate to use
  
json.Unmarshal(resp.Body, &data)

or

json.NewDecoder(resp.Body).Decode(&data)

or

b, _ := ioutil.ReadAll(resp.Body)
json.Unmarshal(b, &data)


What are the uses for each?
Does this differ from how you would read non-JSON responses?

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to