encoding

package
v2.16.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package encoding provides data types and functions for JSON or YAML encoding/decoding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HexBytes

type HexBytes []byte

HexBytes is a byte slice that is marshalled to and from a hex string.

func (HexBytes) MarshalJSON

func (h HexBytes) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (HexBytes) MarshalYAML

func (h HexBytes) MarshalYAML() (any, error)

MarshalYAML implements the yaml.Marshaler interface.

func (HexBytes) String

func (h HexBytes) String() string

String returns the hex encoded string representation of the byte slice.

func (*HexBytes) UnmarshalJSON

func (h *HexBytes) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*HexBytes) UnmarshalYAML

func (h *HexBytes) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

Jump to

Keyboard shortcuts

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