RODProt (version 0.2.0)

read_json_table: A function to read in a JSON Table Schema

Description

A function to read in a JSON Table Schema

Usage

read_json_table(content, schema, overlook.types = FALSE, factorize.foreign.keys = TRUE, getter, ...)

Arguments

content
The content to convert. This can either be a String of JSON, a local filename, or a URL. You can provide the schema and data in a single message (with keys named fields and data, respectively), or you can use the schema paramter to specify the schema and provide only the data here (with no prefacing data:{ attribute).
schema
Optionally, you can provide a separate schema for the message contained in the content parameter. This can be either the JSON itself, a local file reference, or a URL.
overlook.types
If TRUE, any unrecognized or non-supported type will just be treated as a character vector. Otherwise, the function will terminate upon encountering a non-supported type. The currently supported types are: (boolean, string, integer, and number).
factorize.foreign.keys
When TRUE (default), any column leveraging the (non-standardized, at the time of writing -- see https://github.com/dataprotocols/dataprotocols/issues/23) foreign-key functionality of JSON Table Schemas will be handled as a fator, mapping the underlying key to the presented form. Currently, this only works with foreign keys that map integers to strings.
getter
The Getter to use when retrieving the specified data. By default, the getter will be inferred based on the structure of the content parameter. Alternatively, you can explicitly set one here, or even provide a custom getter.
...
Additional arugments to be passed to incorporate-foreign-keys (unexported, but publicly documented in this package).