verify: Verify validity of incoming JSON data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/verify.R

Description

This function checks the json input, runs it against a validation schema, and checks the input json for further processing.

Usage

1
verify(txt = NULL, schema = NULL, ...)

Arguments

txt

a JSON string, URL or file

schema

A JSON string, URL or file that selects the JSON validation schema.

...

Additional parameter passed down to fromJSON(txt, ...), new("xyz",... ) and new("bse",... ). Useful parameters are models = "bsmodel" for setting the broken stick model, or call = as.call(...) for setting proper reference standards.

Value

A list of processed input data. Side effect: messages are thrown for input fields that does not quite conform to the expected data.

Author(s)

Stef van Buuren 2020

See Also

fromJSON

Examples

1
2
fn <- system.file("extdata", "smocc", "Laura_S.json", package = "jamestest")
p <- verify(fn)

stefvanbuuren/minihealth documentation built on March 11, 2021, 7:10 p.m.