Use encoding/json for standard compatibility, json-iterator for a 2-3x speed boost with minimal setup, or sonic for maximum performance if you can accept its assembly-based implementation. For most high-throughput services, sonic offers the best latency, while json-iterator remains the safest drop-in replacement for encoding/json.
import "github.com/bytedance/sonic"
// Drop-in replacement for encoding/json
var data = []byte(`{"key": "value"}`)
var result map[string]interface{}
err := sonic.Unmarshal(data, &result)