Learn R Programming

yyjsonr (version 0.1.21)

Fast 'JSON', 'NDJSON' and 'GeoJSON' Parser and Generator

Description

A fast 'JSON' parser, generator and validator which converts 'JSON', 'NDJSON' (Newline Delimited 'JSON') and 'GeoJSON' (Geographic 'JSON') data to/from R objects. The standard R data types are supported (e.g. logical, numeric, integer) with configurable handling of NULL and NA values. Data frames, atomic vectors and lists are all supported as data containers translated to/from 'JSON'. 'GeoJSON' data is read in as 'simple features' objects. This implementation wraps the 'yyjson' 'C' library which is available from .

Copy Link

Version

Install

install.packages('yyjsonr')

Monthly Downloads

2,025

Version

0.1.21

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Mike Cheng

Last Published

June 2nd, 2025

Functions in yyjsonr (0.1.21)

write_ndjson_file

Write list or data.frame object to NDJSON in a file
yyjson_version

Version number of 'yyjson' C library
write_ndjson_raw

Write list or data.frame object to NDJSON in a raw vector
yyjson_write_flag

Advanced: Values for setting internal options directly on YYJSON library
write_ndjson_str

Write list or data.frame object to NDJSON in a string
yyjson_read_flag

Advanced: Values for setting internal options directly on YYJSON library
write_json_raw

Convert R object to a raw vector of JSON data
write_json_str

Convert R object to JSON string
read_ndjson_file

Parse an NDJSON file to a data.frame or list
read_ndjson_raw

Parse an NDJSON within a raw vector to a data.frame or list
opts_read_json

Create named list of options for parsing R from JSON
read_geojson_str

Load GeoJSON as sf object
opts_read_geojson

Options for reading in GeoJSON
opts_write_json

Create named list of options for serializing R to JSON
as_scalar

Tag an atomic vector with a single element as class 'scalar'. When output to JSON it will be output as a scalar not a vector
read_json_str

Convert JSON in a character string to R
read_json_file

Convert JSON to R
read_json_conn

Parse JSON from an R connection object.
opts_write_geojson

Options for writing from sf object to GeoJSON
read_json_raw

Convert JSON in a raw vector to R
write_geojson_str

Write SF to GeoJSON string
read_ndjson_str

Parse an NDJSON string to a data.frame or list
write_json_file

Convert R object to JSON file
validate_json_file

Validate JSON in file or string