json

package
v0.48.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Overview

Package json implements the sq driver for JSON. There are three supported types: - JSON: plain old JSON - JSONA: JSON Array, where each record is an array of JSON values on its own line. - JSONL: JSON Lines, where each record a JSON object on its own line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectJSON

func DetectJSON(sampleSize int) files.TypeDetectFunc

DetectJSON returns a files.TypeDetectFunc that can detect JSON.

func DetectJSONA

func DetectJSONA(sampleSize int) files.TypeDetectFunc

DetectJSONA returns a files.TypeDetectFunc for TypeJSONA. Each line of input must be a valid JSON array.

func DetectJSONL

func DetectJSONL(sampleSize int) files.TypeDetectFunc

DetectJSONL returns a files.TypeDetectFunc that can detect JSONL.

Types

type Provider

type Provider struct {
	Log      *slog.Logger
	Ingester driver.GripOpenIngester
	Files    *files.Files
}

Provider implements driver.Provider.

func (*Provider) DriverFor

func (d *Provider) DriverFor(typ drivertype.Type) (driver.Driver, error)

DriverFor implements driver.Provider.

Jump to

Keyboard shortcuts

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