Learn R Programming

vcr (version 1.6.0)

Serializer: Serializer class - base class for JSON/YAML serializers

Description

Serializer class - base class for JSON/YAML serializers

Serializer class - base class for JSON/YAML serializers

Arguments

Public fields

file_extension

(character) A file extension

path

(character) full path to the yaml file

Methods


Method new()

Create a new YAML object

Usage

Serializer$new(file_extension = NULL, path = NULL)

Arguments

file_extension

(character) A file extension

path

(character) path to the cassette, excluding the cassette directory and the file extension

Returns

A new YAML object


Method serialize()

Serializes a hash - REPLACED BY YAML/JSON METHODS

Usage

Serializer$serialize(x, path, bytes)

Arguments

x

(list) the object to serialize

path

(character) the file path

bytes

(logical) whether to preserve exact body bytes or not

Returns

(character) the YAML or JSON string to write to disk


Method deserialize()

Serializes a file - REPLACED BY YAML/JSON METHODS

Usage

Serializer$deserialize()


Method clone()

The objects of this class are cloneable with this method.

Usage

Serializer$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.