schema_org_writer: Schema org writer

Description Usage Arguments Value See Also Examples

View source: R/schema_org_writer.R

Description

Schema org writer

Usage

1
schema_org_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(), codemeta_writer(), rdf_xml_writer(), ris_writer()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
if (requireNamespace("bibtex", quietly=TRUE)) {
(z <- system.file('extdata/bibtex.bib', package = "handlr"))
(tmp <- bibtex_reader(z))
schema_org_writer(tmp)
schema_org_writer(tmp, pretty = FALSE)
}

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

handlr documentation built on Jan. 13, 2021, 7:27 a.m.