marshal

package
v0.204.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 10 Imported by: 3 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(object any) ([]byte, error)

Marshal returns a JSON encoding of the given object. Included fields: - non-empty value - a basic type whose field's name is present in forceSendFields Nil interfaces, nil pointers, and nil or empty maps and slices are not serialized even if their field name appears in ForceSendFields Embedded structs are still considered a separate struct. ForceSendFields in an embedded struct only impact the fields of the embedded struct. Conversely, an embedded struct is not impacted by the ForceSendFields of the struct containing it.

func Unmarshal

func Unmarshal(data []byte, v any) error

Unmarshals a JSON element and fills in the ForceSendFields field if the struct contains it. Only anotates basic types in the ForceSendFields.

Types

This section is empty.

Jump to

Keyboard shortcuts

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