Documentation ¶ Overview ¶ package to contains functions for converting between types. Index ¶ func JSON(rw http.ResponseWriter, obj any, writerOpts ...func(w io.Writer) io.Writer) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func JSON ¶ func JSON(rw http.ResponseWriter, obj any, writerOpts ...func(w io.Writer) io.Writer) error JSON writes the given object to the response body as JSON. If obj is a nil slice, an empty JSON array is written. If obj is a nil map, an empty JSON object is written. If obj is a nil pointer, a null is written. Types ¶ This section is empty. Source Files ¶ View all Source files json.go Click to show internal directories. Click to hide internal directories.