The sf object is written to a temporary file and re-read with jsonlite::read_json().
sf_to_json(sf_obj, layer_name)
sf_obj
sf table
json list