https://github.com/ropensci/jsonvalidate
:heavy_check_mark::interrobang: Validate JSON
https://github.com/ropensci/jsonvalidate
json json-validation jsonvalidate r r-package rstats
Last synced: 2 months ago
JSON representation
:heavy_check_mark::interrobang: Validate JSON
- Host: GitHub
- URL: https://github.com/ropensci/jsonvalidate
- Owner: ropensci
- License: other
- Created: 2016-03-31T22:26:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-02-07T11:47:42.000Z (4 months ago)
- Last Synced: 2025-03-28T05:13:24.798Z (2 months ago)
- Topics: json, json-validation, jsonvalidate, r, r-package, rstats
- Language: R
- Homepage: https://docs.ropensci.org/jsonvalidate
- Size: 795 KB
- Stars: 49
- Watchers: 6
- Forks: 14
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - ropensci/jsonvalidate - :heavy_check_mark::interrobang: Validate JSON (R)
README
# jsonvalidate
[](https://www.repostatus.org/#active)
[](https://github.com/ropensci/jsonvalidate/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/github/ropensci/jsonvalidate?branch=master)
[](https://cran.r-project.org/package=jsonvalidate)Validate JSON against a schema using [`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid) or [`ajv`](https://github.com/ajv-validator/ajv). This package is a thin wrapper around these node libraries, using the [V8](https://cran.r-project.org/package=V8) package.
## Usage
Directly validate `json` against `schema`
```r
jsonvalidate::json_validate(json, schema)
```or create a validator for multiple uses
```r
validate <- jsonvalidate::json_validator(schema)
validate(json)
validate(json2) # etc
```See the [package vignette](https://docs.ropensci.org/jsonvalidate/articles/jsonvalidate.html) for complete examples.
## Installation
Install from CRAN with
```r
install.packages("jsonvalidate")
```Alternatively, the current development version can be installed from GitHub with
```r
devtools::install_github("ropensci/jsonvalidate")
```## License
MIT + file LICENSE © [Rich FitzJohn](https://github.com/richfitz).
Please note that this project is released with a [Contributor Code of Conduct](https://github.com/ropensci/jsonvalidate/blob/master/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
[](https://ropensci.org/)