Saves a Recipe object to a file in JSON format.
Usage
save_recipe(recipe, file)
Arguments
- recipe
A Recipe object.
- file
A character string specifying the file path.
Details
This function encodes the Recipe object and writes it to a JSON file.
Examples
# Example of saving a Recipe object
save_recipe(recipe_obj, "recipe.json")
#> Error: object 'recipe_obj' not found