Validate 'JSON' Schema

Uses the node library 'is-my-json-valid' or 'ajv' to validate 'JSON' against a 'JSON' schema. Drafts 04, 06 and 07 of 'JSON' schema are supported.


jsonvalidate

Project Status: Active – The project has reached a stable, usable state and is being actively developed. R-CMD-check codecov.io

Validate JSON against a schema using is-my-json-valid or ajv. This package is a thin wrapper around these node libraries, using the V8 package.

Usage

Directly validate json against schema

jsonvalidate::json_validate(json, schema)

or create a validator for multiple uses

validate <- jsonvalidate::json_validator(schema)
validate(json)
validate(json2) # etc

See the package vignette for complete examples.

Installation

Install from CRAN with

install.packages("jsonvalidate")

Alternatively, the current development version can be installed from GitHub with

devtools::install_github("ropensci/jsonvalidate")

License

MIT + file LICENSE © Rich FitzJohn.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

ropensci_footer

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("jsonvalidate")

1.5.0 by Rich FitzJohn, 2 years ago


https://docs.ropensci.org/jsonvalidate/, https://github.com/ropensci/jsonvalidate


Report a bug at https://github.com/ropensci/jsonvalidate/issues


Browse source code at https://github.com/cran/jsonvalidate


Authors: Rich FitzJohn [aut, cre] , Rob Ashton [aut] , Alex Hill [ctb] , Alicia Schep [ctb] , Ian Lyttle [ctb] , Kara Woo [ctb] , Mathias Buus [aut, cph] (Author of bundled imjv library) , Evgeny Poberezkin [aut, cph] (Author of bundled Ajv library)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports R6, V8

Suggests knitr, jsonlite, rmarkdown, testthat, withr


Imported by FaaSr, OmicFlow, TKCat, biocompute, boilerplate, campsis, campsismod, campsisnca, cffr, clinDataReview, llmflow, openrouteservice, rmzqc, rtemis.llm.

Suggested by LLMR, LLMRagent, PhenotypeR, R2camtrapdp, codemetar, dataquieR, datasetjson, metainsight, muttest, odin, orderly, renv, rtemis, rtemis.draw, soilKey, tidyprompt.


See at CRAN