Challenge 2 — Solution Task: Given a raw JSON string {"name":"Laptop","price":999.99, "inStock":true}, define a matching struct with appropriate json tags, unmarshal it, and print each field. package main import ( "encoding/json" "fmt" ) type Product struct { Name string `json:"name"` Price float64 `json:"price"` InStock bool `json:"inStock"` } func main() { jsonData := []byte(`{"name":"Laptop","price":999.99,"inStock":true}`) var product Product err := json.Unmarshal(jsonData, &product) if err != nil { fmt.Println("Error:", err) return } fmt.Println(product.Name) fmt.Println(product.Price) fmt.Println(product.InStock) } Expected output: Laptop 999.99 true Notes: - &product (a pointer) is required — json.Unmarshal writes the parsed values through that pointer into the real product variable; passing product alone would leave it unchanged. - The struct's json tags must match the JSON's actual key names exactly (case-sensitive) for each field to populate correctly — here "name", "price", and "inStock" all match. - []byte(`...`) converts the JSON text into the byte slice that json.Unmarshal expects as its input.