codec

package
v1.0.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalJSON

func MarshalJSON(doc *spec.Document) ([]byte, error)

MarshalJSON encodes OpenCLI Spec compliant document into bytes in the requested format.

func MarshalYAML

func MarshalYAML(doc *spec.Document) ([]byte, error)

Marshal encodes OpenCLI Spec into bytes in the requested format.

func UnmarshalJSON

func UnmarshalJSON(data []byte) (*spec.Document, error)

UnmarshalJSON decodes serialized JSON bytes into a Spec.

func UnmarshalYAML

func UnmarshalYAML(data []byte) (*spec.Document, error)

UnmarshalYAML decodes serialized YAML bytes into a Spec.

Types

type Format

type Format string

Format indicates input/output format

const (
	FormatYAML Format = "yaml"
	FormatJSON Format = "json"
)

Jump to

Keyboard shortcuts

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