Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 26 days 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 (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-25T16:39:17.000Z (8 months ago)
- Last Synced: 2024-09-30T02:43:09.134Z (about 1 month ago)
- Topics: json, json-validation, jsonvalidate, r, r-package, rstats
- Language: R
- Homepage: https://docs.ropensci.org/jsonvalidate
- Size: 779 KB
- Stars: 48
- Watchers: 7
- Forks: 14
- Open Issues: 17
-
Metadata Files:
- Readme: README.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
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/ropensci/jsonvalidate/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ropensci/jsonvalidate/actions/workflows/R-CMD-check.yaml)
[![codecov.io](https://codecov.io/github/ropensci/jsonvalidate/coverage.svg?branch=master)](https://codecov.io/github/ropensci/jsonvalidate?branch=master)
[![](http://www.r-pkg.org/badges/version/jsonvalidate)](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.
[![ropensci_footer](https://ropensci.org//public_images/github_footer.png)](https://ropensci.org/)