Files
vsix-hpl-toolbox/standalone/json.go
2026-05-27 18:37:52 +08:00

12 lines
190 B
Go

package main
import (
"encoding/json"
"net/http"
)
func writeJSON(w http.ResponseWriter, v any) {
w.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(w).Encode(v)
}