Skip to contents

Keeps track of the cassette serializers in a hash-like object

Usage

serializer_fetch(x = "yaml", name)

Details

Private Methods

serialize_get()

Gets a named serializer. This is also run on Serializers$new()

Public fields

serializers

(list) list of serializer names

name

(character) Name of a serializer. "yaml" (default) or "json"

Methods


Method new()

Create a new Serializers object

Usage

Serializers$new(serializers = list(), name = "yaml")

Arguments

serializers

(list) list of serializer names

name

(character) Name of a serializer. "yaml" (default) or "json"

Returns

A new Serializers object


Method clone()

The objects of this class are cloneable with this method.

Usage

Serializers$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # \dontrun{
(aa <- Serializers$new())
aa$name
aa$serializers
yaml_serializer <- aa$serializers$new()
yaml_serializer

x <- Serializers$new(name = "json")
x$serializers$new()
json_serializer <- x$serializers$new()
json_serializer
} # }