jsonencoding

package
v0.22.3 Latest Latest
Warning

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

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

Documentation

Overview

Package jsonencoding defines common types with JSON marshalers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

type Duration struct {
	time.Duration
}

Duration adds text/json (un)marshaling functions to time.Duration.

func (Duration) MarshalText

func (d Duration) MarshalText() ([]byte, error)

MarshalText writes d as text.

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(b []byte) error

UnmarshalText read d from a text representation.

Jump to

Keyboard shortcuts

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