Skip to content

Create a vctrs::vec_ptype() from a JSON-serialized prototype created with cereal_encode().

Usage

cereal_decode(x)

Arguments

x

An object with class "cereal_*", such as "cereal_integer" or "cereal_factor"

Value

A vector of zero length, such as integer() or vctrs::new_factor()

Examples

cereal_decode(structure(list(), class = "cereal_integer"))
#> integer(0)
cereal_decode(structure(list(), class = "cereal_Date"))
#> Date of length 0