json

package
v0.74.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package json is a concrete implementation of the encoding abstractions.

Index

Constants

View Source
const (
	// Type JSON definition.
	Type string = "application/json"
	// TypeCharset JSON definition with charset.
	TypeCharset string = "application/json; charset=utf-8"
)

Variables

This section is empty.

Functions

func Decode

func Decode(data io.Reader, v interface{}) error

Decode a reader input into a JSON model.

func DecodeRaw

func DecodeRaw(data []byte, v interface{}) error

DecodeRaw a byte slice input into a JSON model.

func Encode

func Encode(v interface{}) ([]byte, error)

Encode a JSON model and return a byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳