codemeta_writer: codemeta writer

View source: R/codemeta_writer.R

codemeta_writerR Documentation

codemeta writer

Description

codemeta writer

Usage

codemeta_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

an object of class json

See Also

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

Other codemeta: codemeta_reader()

Examples

if (requireNamespace("bibtex", quietly=TRUE)) {
(x <- system.file('extdata/crossref.bib', package = "handlr"))
(z <- bibtex_reader(x))
codemeta_writer(z)
}

# many citeproc to schema 
z <- system.file('extdata/citeproc-many.json', package = "handlr")
w <- citeproc_reader(x = z)
codemeta_writer(w)
codemeta_writer(w, pretty = FALSE)

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