Documentation ¶
Overview ¶
package heron provides a streaming JSON parser that emits JSON objects and arrays as they are parsed. Non-JSON lines and errors are emitted separately.
Index ¶
Constants ¶
View Source
const (
// The default buffer size used to accumulate non json bytes.
DefaultBufSize = 512
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Heron ¶
type Heron struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(*Heron)
func WithBufSize ¶
WithBufSize sets the buffer size used to accumulate non json bytes.
func WithBytes ¶
WithBytes sets the function to call when a non JSON line is parsed. This function is called when either a newline is encountered or the buffer is full. Setting to 0 disables internal buffering and emitting of non JSON bytes.
Click to show internal directories.
Click to hide internal directories.