citeproc_writer: citeproc writer

View source: R/citeproc_writer.R

citeproc_writerR Documentation

citeproc writer

Description

citeproc writer

Usage

citeproc_writer(z, auto_unbox = TRUE, pretty = TRUE, ...)

Arguments

z

an object of class handl; see handl for more

auto_unbox

(logical) automatically "unbox" all atomic vectors of length 1 (default: TRUE). passed to jsonlite::toJSON()

pretty

(logical) adds indentation whitespace to JSON output (default: TRUE), passed to jsonlite::toJSON()

...

further params passed to jsonlite::toJSON()

Value

citeproc as JSON

See Also

Other writers: bibtex_writer(), cff_writer(), codemeta_writer(), rdf_xml_writer(), ris_writer(), schema_org_writer()

Other citeproc: citeproc_reader()

Examples

z <- system.file('extdata/citeproc.json', package = "handlr")
(tmp <- citeproc_reader(z))
citeproc_writer(z = tmp)
citeproc_writer(z = tmp, pretty = FALSE)
cat(ris_writer(z = tmp))

# many
z <- system.file('extdata/citeproc-many.json', package = "handlr")
w <- citeproc_reader(x = z)
citeproc_writer(w)

ropensci/handlr documentation built on April 26, 2022, 7:37 a.m.