jsonutil

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package jsonutil provides common utilities for properly handling JSON payloads in HTTP body.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalResponse added in v0.19.0

func MarshalResponse(w http.ResponseWriter, status int, response interface{})

func Unmarshal

func Unmarshal(w http.ResponseWriter, r *http.Request, data interface{}) (int, error)

Unmarshal provides a common implementation of JSON unmarshalling with well defined error handling.

Types

This section is empty.

Jump to

Keyboard shortcuts

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