jsonx

package
v2.55.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 3 Imported by: 0

Documentation

Overview

Package jsonx contains utilities for working with JSON encoded data.

TODO(https://github.com/apache/beam/issues/20271): 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 any) ([]byte, error)

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

func MarshalTo

func MarshalTo(elem any, w io.Writer) error

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

func Unmarshal

func Unmarshal(elem any, 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 any, 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