class with methods for serializing via jsonlite
vcr::Serializer
-> JSON
new()
Create a new JSON
object
JSON$new(path = NULL)
path
(character) full path to the yaml file
A new JSON
object
serialize()
Serializes the given hash using internal fxn write_json
JSON$serialize(x, path, bytes)
x
(list) the object to serialize
path
(character) the file path
bytes
(logical) whether to preserve exact body bytes or not
(character) the json string to write to disk
deserialize()
Deserializes the content at the file path using jsonlite::fromJSON
JSON$deserialize(cassette)
cassette
the current cassette object so it's properties can be retrieved
(list) the deserialized object, an R list
clone()
The objects of this class are cloneable with this method.
JSON$clone(deep = FALSE)
deep
Whether to make a deep clone.