Learn R Programming

campsismod (version 1.4.0)

map_s4_slots_to_json_properties: Map S4 slots to JSON properties.

Description

Map S4 slots to JSON properties.

Usage

map_s4_slots_to_json_properties(
  object,
  add_type = TRUE,
  optional = NULL,
  ignore = NULL
)

Value

a JSON object ready to be serialised

Arguments

object

S4 object

add_type

add type as a property, TRUE by default

optional

properties that are optional in JSON, character vector

ignore

slots to be ignored