YAML: The YAML serializer

Description Super class Methods

Description

class with methods for serializing via the yaml package

Super class

vcr::Serializer -> YAML

Methods

Public methods

Inherited methods

Method new()

Create a new YAML object

Usage
YAML$new(path = NULL)
Arguments
path

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

Returns

A new YAML object


Method serialize()

Serializes the given hash using internal fxn write_yaml

Usage
YAML$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 string to write to disk


Method deserialize()

Deserializes the content at the path using yaml::yaml.load_file

Usage
YAML$deserialize()
Returns

(list) the deserialized object, an R list


Method clone()

The objects of this class are cloneable with this method.

Usage
YAML$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


vcr documentation built on June 1, 2021, 1:06 a.m.