validate: Validate ndjson file

View source: R/ndjson.R

validateR Documentation

Validate ndjson file

Description

Given a file of streaming JSON (ndjson) this function reads in the records and validates that they are all legal JSON records. If the verbose parameter is TRUE and errors are found, the line numbers of the errant records will be displayed.

Usage

validate(path, verbose = FALSE)

Arguments

path

path to file (supports "gz" files)

verbose

display verbose information (filename and line numbers with bad records)

Value

logical

References

http://ndjson.org/

Examples

f <- system.file("extdata", "test.json", package="ndjson")
validate(f)

gzf <- system.file("extdata", "testgz.json.gz", package="ndjson")
validate(gzf)

hrbrmstr/ndjson documentation built on Oct. 19, 2022, 7:04 p.m.