jsonio

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader added in v0.1.1

type Reader[T any] struct {
	// contains filtered or unexported fields
}

Reader reads objects of type T from a Reader.

func NewReader added in v0.1.2

func NewReader[T any](r io.Reader, newValue func() T) *Reader[T]

func (*Reader[T]) Read added in v0.1.1

func (r *Reader[T]) Read() iter.Seq2[T, error]

Read returns an iter.Seq which sequentially decodes Json objects from the reader.

type Writer added in v0.1.1

type Writer[T any] struct {
	// contains filtered or unexported fields
}

Writer writes objects of type T to a Writer.

func NewWriter added in v0.1.2

func NewWriter[T any](w io.Writer, seq iter.Seq[T]) *Writer[T]

func (*Writer[T]) Write added in v0.1.1

func (w *Writer[T]) Write() error

Write consumes the sequence of objects, encoding them to the Writer.

Jump to

Keyboard shortcuts

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