jsonmw

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StrictDecoder

func StrictDecoder(r *http.Request) (*json.Decoder, error)

StrictDecoder creates a JSON decoder that disallows unknown fields.

Types

type Middleware

type Middleware struct {
	RequireJSON bool
}

func New

func New(require bool) *Middleware

func (*Middleware) Handler

func (m *Middleware) Handler(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL