To decode JSON data into a Go value, you would use the _____ function.

  • Decode
  • Parse
  • Unmarshal
  • Deserialize
The correct answer is Unmarshal. In Go, to decode JSON data into a Go value, you would use the Unmarshal function provided by the encoding/json package. This function takes a JSON byte slice and a pointer to a Go data structure, and it populates the Go data structure with the values from the JSON data. It's a key function for converting JSON data into usable Go data structures.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *