Skip to content

EasyConceptHTTP services and the standard library

How do you encode and decode JSON?

What a good answer covers

Use json.NewEncoder(w).Encode(v) and json.NewDecoder(r.Body).Decode(&v), or json.Marshal and json.Unmarshal for byte slices.

More on HTTP services and the standard library

Flashcards for this topic