jsonlite: A Simple and Robust JSON Parser and Generator for R

A reasonably fast JSON parser and generator, optimized for statistical data and the web. Offers simple, flexible tools for working with JSON in R, and is particularly powerful for building pipelines and interacting with a web API. The implementation is based on the mapping described in the vignette (Ooms, 2014). In addition to converting JSON data from/to R objects, 'jsonlite' contains functions to stream, validate, and prettify JSON data. The unit tests included with the package verify that all edge cases are encoded and decoded consistently for use with dynamic data in systems and applications.

Version: 2.0.0
Depends: methods
Suggests: httr, vctrs, testthat, knitr, rmarkdown, R.rsp, sf
Published: 2025-03-27
DOI: 10.32614/CRAN.package.jsonlite
Author: Jeroen Ooms ORCID iD [aut, cre], Duncan Temple Lang [ctb], Lloyd Hilaiel [cph] (author of bundled libyajl)
Maintainer: Jeroen Ooms <jeroenooms at gmail.com>
BugReports: https://github.com/jeroen/jsonlite/issues
License: MIT + file LICENSE
URL: https://jeroen.r-universe.dev/jsonlite https://arxiv.org/abs/1403.2805
NeedsCompilation: yes
Citation: jsonlite citation info
Materials: NEWS
In views: WebTechnologies
CRAN checks: jsonlite results

Documentation:

Reference manual: jsonlite.html , jsonlite.pdf
Vignettes: Getting started with JSON and jsonlite (source, R code)
Fetching JSON data from REST APIs (source)
Combining pages of JSON data with jsonlite (source)
A mapping between JSON data and R objects (source)
Simple JSON RPC with OpenCPU (source)

Downloads:

Package source: jsonlite_2.0.0.tar.gz
Windows binaries: r-devel: jsonlite_2.0.0.zip, r-release: jsonlite_2.0.0.zip, r-oldrel: jsonlite_2.0.0.zip
macOS binaries: r-release (arm64): jsonlite_2.0.0.tgz, r-oldrel (arm64): jsonlite_2.0.0.tgz, r-release (x86_64): jsonlite_2.0.0.tgz, r-oldrel (x86_64): jsonlite_2.0.0.tgz
Old sources: jsonlite archive

Reverse dependencies:

Reverse depends: BrowserViz, ClusterJudge, Cogito, cyjShiny, dictionaRy, eFRED, ExpressionAtlas, GoogleKnowledgeGraphR, hystReet, instaR, limexhub, openblender, pxR, rflsgen, RGoogleAnalyticsPremium, RGoogleFit, Rlabkey, RWildbook, webglobe
Reverse imports: abn, abstr, academictwitteR, acdcquery, ACEP, Achilles, acled.api, acR, acumos, adformR, adobeanalyticsr, adsDataHubR, agenticr, agentr, AI4OfficialStats, aieconindex, AIGENIE, AirExposure, airGRiwrm, aiRly, airnow, airr, AIscreenR, aisdk, aisdk.providers, alabaster.base, alabaster.mae, alabaster.sce, alabaster.se, alabaster.sfe, alfr, alfred, algaeClassify, AlgeriAPIs, algo, allofus, AlphaSDM, alphavantagepf, alphavantager, altadata, altfuelr, amapGeocode, AMAPVox, amazonadsR, amazons3R, amazonspR, analogsea, andorR, animate, aniview, ankiR, AnnotationHubData, antaresEditObject, antaresRead, AntClassify, AnVIL, AnVILAz, AnVILBase, AnVILGCP, AnVILPublish, AnVILWorkflow, aos, APCalign, apexcharter, AplosNCA, appeears, appleadsR, appsflyeR, apsimx, arakno, arcgeocoder, archiveRetriever, arcpullr, ArctosR, ARDECO, arete, ArgentinAPI, argparse, arkg, ARPALData, ArrayExpress, arrayQualityMetrics, artoo, asciicast, askgpt, AstraeaDB, astronomR, ato, atom4R, aurora, ausOpenData, ausplotsR, AutoDeskR, AutoGenAI, autoslider.core, available, awinR, AWR.Kinesis, aws.ec2metadata, aws.iam, aws.kms, aws.lambda, aws.polly, aws.signature, aws.transcribe, aws.translate, axprism, azlogr, azr, AzureAppInsights, AzureAuth, AzureCognitive, AzureCosmosR, AzureGraph, AzureKeyVault, AzureKusto, azuremapsr, AzureRMR, AzureTableStor, AzureVM, BacenAPI, bacenR, badgen, bambooHR, baseballr, batata, BAwiR, bbk, bcdata, bcmaps, bddkR, bdl, bea.R, beakr, bedrockbio, betbetter, bettr, BgeeCall, bibliometrix, bidser, bidsr, bidux, bifrost, bigrquery, billboarder, binancer, bingadsR, binman, binxr, biobouncer, biobtreeR, BiocAzul, BiocFHIR, BiocMaintainerApp, biocompute, BiocPkgTools, biodb, biofetchR, biohttp, biomartr, BIOMASS, biometryassist, biomformat, biopalette, bioRad, BioTooltipR, bitfield, bitmexr, bizdays, blastula, blockr.core, blockr.dag, blockr.dock, blockr.dplyr, blockr.session, blogdown, blsBandit, bluertopo, bodsr, boilerplate, BOLDconnectR, bonn, BoSSA, botor, boxr, brandwatchR, brapiR2, BrazilDataAPI, brfssdata, brickset, brickster, briqr, brulee, bs4Dash, bs4Dashkit, bslib, bsplus, btw, BulkSignalR, bunddev, buoyant, bursa, ButtR, bvarnet, bysykkel, c2z, c3, calpassapi, camcorder, campaignmanageR, campsis, campsismod, campsisnca, cancensus, canpumf, canvasXpress, Capsule, carbondata, caRecall, carwatch, castor, catchmentACS, catSurv, causalfrag, cbioportalR, cbpManager, cbsodataR, ccdR, ccmReportR, CDMConnector, cdrcR, CDSE, cellbaseR, celldex, cellscape, censusapi, CEOdata, CepalStatR, cereal, Certara.DarwinReporter, Certara.R, Certara.RDarwin, Certara.RsNLME, Certara.RsNLME.ModelExecutor, cfbfastR, cffr, chatAI4R, chatgpt, chatLLM, chatRater, chatterbox, checked, cheetahR, ChemmineR, chemodiv, childesr, ChileDataAPI, chillR, ChinAPIs, chiOpenData, chirps, chms, chromConverter, chromote, ChromSCape, cimir, cincinnatiOpenData, circle, citation, citationchaser, citecorp, civic.icarm, civis, cjar, ckanr, cleanrmd, ClickHouseHTTP, climaemet, ClimMobTools, clinDataReview, clinicalomicsdbR, clinTrialData, clootl, closecity, cloudml, cloudosR, ClustAssess, clusterProfiler, cmhc, CNAIM, codebook, codemeta, codemetar, codestral, codriver, cogeqc, cohortBuilder, CohortContrast, CohortGenerator, CohortIncidence, CohortMethod, coinmarketcapr, collidr, ColombiAPI, colourlovers, colourpicker, cometr, comf, commons, compIndexBuilder, complexr, CompoundDb, concaveman, condathis, configr, conjurer, connectapi, connectoModa, connector, connectwidgets, conrad, contactsurveys, contentanalysis, cookiecutter, cookies, coOpenData, CopernicusClimate, CopernicusDataspace, CopernicusMarine, coresynth, correctref, corteza, countries, countyhealthR, courieR, covr, cpsR, craftgrn, cranlogs, credentials, cricketdata, crosstalk, crul, crunch, crypto2, cryptoQuotes, cryptotrackr, cryptowatchR, csodata, csvwr, csvy, ctf, cthist, ctoclient, ctOpenData, ctrdata, ctxR, cuda.ml, currencyapi, cyclestreets, CytobankAPI, CytoML, CytoPipeline, czso, d4storagehub4R, DACT, daff, dagitty, daiR, data.checker, data360r, data4health, datacommons, dataganger, datamedios, dataone, datapackage, datapond, DataQualityDashboard, dataRetrieval, datarobot, dataseries, datasetviewer, DataSpaceR, dataspice, DatastreamDSWS2R, DatastreamR, datasus, dataverse, datazoom.saude, datom, datoramar, DCC, debrowser, deckgl, deepdep, deeplr, deepRstudio, deliberr, delta.sharing, deltabreedquery, deOpenData, DEPONS2R, deps, DescriptiveStats.OBeu, designer, DEsubs, dextergui, dfeR, diezeit, diffuseR, diffviewer, dimensionsR, dipsaus, dir2json, disastr.api, diseasystore, distcomp, distill, distilleR, dkanr, dlstats, dockerfiler, DockerParallel, DOIcreator, Doscheda, dowser, dpdr, dplyneage, DQAgui, DQAstats, dragmapr, dragonfarm, drhutools, drogonR, DSMolgenisArmadillo, dsROCrate, DT, DT2, DTAT, dtreg, dtsmartr, duckduckr, duckplyr, duckspatial, dwg2geo, dynatopGIS, earthdatalogin, earthUI, ebirdst, ebvcube, ebx, ecan, ecce, ECharts2Shiny, echarts4r, econdatasets, ecos, ECOTOXr, edgarfundamentals, edgarWebR, EDIutils, edr4r, educationdata, eia, EIAapi, eidosapi, eiopaR, elastic, elcf4R, elevatr, ellmer, ellmercodex, emailvalidation, EML, emld, emuR, ENCODExplorerData, engager, enhancerHomologSearch, EnrichIntersect, enrichViewNet, eodhdR2, epicR, epidata, epidatr, epigraphdb, episomer, epiviz, eplusr, Epoch, eppoFindeR, esmtools, esquisse, EstimateBreed, esviz, etrader, euroleaguer, europepmc, eurostat, evolMap, evolution, evprof, evsim, EWAScaller, examly, excelR, exCon, exifr, exiftoolr, eyeris, f1dataR, f1pits, FaaSr, fabricQueryR, facebookadsR, facebookleadsR, facebookorganicR, facerec, FakeDataR, fanyi, faq, fastei, fastRhockey, faux, favawesome, fbRads, FeatureExtraction, FedData, federalregister, fedstatAPIr, feltr, fetchGoogleAnalyticsR, fetchSalesforceR, ffaframework, ffiec, ffscrapr, fgga, fHMM, finbif, finna, finnishgrid, finnts, finto, firebase, fireData, fireproof, firmmatchr, fishpond, fishRman, fishtree, fitbitr, fitbitScraper, fitzRoy, fixerapi, FLAMES, flashCard, flexdashboard, flexsiteboard, flexurba, flipdownr, flora, florabr, flourishcharts, fluxfinder, fmpcloudr, fmrihrf, fomantic.plus, formr, FormShare, foundry, foundryR, fourSynergy, fqar, framework, franc, fredr, freecurrencyapi, frheritage, frictionless, frostlake, frostr, fscontext,