json

package
v2.288.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package json provides JSON encoding helpers and adapters used by go-service.

This package integrates JSON encoding/decoding behind the go-service encoding abstraction.

Start with the package-level constructors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder struct{}

Encoder implements JSON encoding and decoding.

func NewEncoder

func NewEncoder() *Encoder

NewEncoder constructs a JSON encoder.

func (*Encoder) Decode

func (e *Encoder) Decode(r io.Reader, v any) error

Decode reads JSON from r into v.

func (*Encoder) Encode

func (e *Encoder) Encode(w io.Writer, v any) error

Encode writes v as JSON to w.

Jump to

Keyboard shortcuts

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