Skip to contents

Validate JSON text

Usage

morie_jsonlt_validate(txt)

Arguments

txt

character; lines are joined with newlines.

Value

TRUE, or FALSE with attributes err and offset.

Examples

txt <- c('alpha', 'beta', 'gamma', 'delta')
res <- morie_jsonlt_validate(txt = txt)
res
#> [1] FALSE
#> attr(,"offset")
#> [1] 1
#> attr(,"err")
#> [1] "unexpected character at character 1"