as_jsonld: Convert a list object to JSON-LD

Description Usage Arguments Examples

Description

Convert a list object to JSON-LD

Usage

1
2
as_jsonld(x, context = "http://schema.org", pretty = TRUE,
  auto_unbox = TRUE, ...)

Arguments

x

the object to be encoded

context

JSON-LD context; "http://schema.org"

pretty

adds indentation whitespace to JSON output. Can be TRUE/FALSE or a number specifying the number of spaces to indent. See prettify

auto_unbox

automatically unbox all atomic vectors of length 1. It is usually safer to avoid this and instead use the unbox function to unbox individual elements. An exception is that objects of class AsIs (i.e. wrapped in I()) are not automatically unboxed. This is a way to mark single values as length-1 arrays.

...

arguments passed on to class specific print methods

Examples

1
2
x <- Thing(url = "http://schema.org")
as_jsonld(x)

cboettig/schemar documentation built on May 20, 2019, 4:27 p.m.