jsonx

package
v2.26.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package jsonx contains utilities for working with JSON encoded data.

TODO(BEAM-9616): Delete this package once the SDK defaults to schemas.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(elem interface{}) ([]byte, error)

Marshal encodes a given value as JSON, and returns the bytes.

func MarshalTo

func MarshalTo(elem interface{}, w io.Writer) error

MarshalTo encodes a given value as JSON, and returns the bytes.

func Unmarshal

func Unmarshal(elem interface{}, data []byte) error

Unmarshal decodes a given value as JSON, and returns the bytes. The passed in element must be a pointer of the given type.

func UnmarshalFrom

func UnmarshalFrom(elem interface{}, r io.Reader) error

UnmarshalFrom decodes a given value as JSON, and returns the bytes. The passed in element must be a pointer of the given type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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