Coerce an emld object into JSON
as_json(x, file = NULL)
an emld object
optional path to write out to file. Otherwise, defaults to NULL and will return a json object.
a json object. Or if a file path is provided, the metadata
is written out in JSON file and the function returns
Note: since emld list object maintains a 1:1 correspondence with JSON, following the conventions of jsonlite, this function is basically trivial. The only purpose is to default to auto_unbox = TRUE in serializing lists to JSON.