ndjson

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package ndjson implements newline-delimited JSON as a codec.Codec. Each record is a JSON value followed by a single '\n' — the format is intentionally line-oriented so that partial reads remain parseable. The codec accepts slice values: Marshal emits one record per element, Unmarshal splits on '\n' and decodes each non-empty line into a new slice element.

Index

Constants

This section is empty.

Variables

View Source
var (
	//: register the singleton and expose it as a typed package var.
	Codec codec.Codec = codec.Register(&ndjsonCodec{})
)

Package-level state: the codec singleton plus the hoisted MIME / extension tables (hoisted).

Functions

func New

func New() codec.Codec

New returns an NDJSON codec instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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