Documentation
¶
Overview ¶
Package json reads JSON values into documents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader parses a JSON payload into *document.Document entries. Top-level arrays produce one document per element; every other JSON value produces one document containing its raw representation. Numbers retain their source spelling and are not restricted to the float64 range.
Use it to ingest API responses, dump files, or seed fixture data.
Example:
r, err := json.NewReader(strings.NewReader(`[{"id":1},{"id":2}]`), json.ReaderConfig{})
docs, err := r.Read(ctx) // 2 documents
type ReaderConfig ¶
type ReaderConfig struct {
SourceBudget etl.SourceBudget
}
ReaderConfig controls the whole-source memory budget. The zero budget uses etl.DefaultMaxSourceBytes.
Click to show internal directories.
Click to hide internal directories.