- Notifications
You must be signed in to change notification settings - Fork0
mtmorgan/rjsoncons
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This package provides functions to query (filter or transform), pivot(convert from array-of-objects to object-of-arrays, for easy import as'R' data frame), search, patch (edit), and validate (againstJSONSchema) 'JSON' and 'NDJSON' strings, files, or URLs. Query andpivot supportJSONpointer,JSONpath orJMESpathexpressions. The implementation uses thejsoncons header-onlylibrary; the library is easily linked to other packages for directaccess to 'C++' functionality not implemented here.
Install the released package version from CRAN
install.packages("rjsoncons",repos="https://CRAN.R-project.org")
Install the development version with
if (!requireNamespace("remotes",quiety=TRUE)) install.packages("remotes",repos="https://CRAN.R-project.org")remotes::install_github("mtmorgan/rjsoncons")
Attach the installed package to yourR session with
library(rjsoncons)Theintroductory vignette outlines common use cases, including:
- Filter large JSON or NDJSON documents to extract records or elementsof interest.
- Extract deeply nested elements.
- Transform data for more direct incorporation inR data structures.
- 'Patch' JSON strings programmatically, e.g., to update HTTP requestpayloads.
- Validate JSON documents against JSON schemas
Thejsoncons C++ header-only library is a very useful startingpoint for advanced JSON manipulation. The vignette outlines howrjsoncons can be used by otherR packages wishing to access theC++ library.
See theintroductory vignette for additional details.
Packages0
Uh oh!
There was an error while loading.Please reload this page.