Using the jsonlite
library in R you can read, write, and manipulate JSON data.
This Gist contains an example (write_json.R
) of writing a list
containing ecological "data types" and arrays of column data types to a JSON file using jsonlite::write_json
.
That JSON file nicely serializes a mapping of the key values (e.g., "FSH", "IHI") — the ecological data types — to the associated data — the column data types.
To use this serialization (a data structure written to file) an example is given (read_json.R
) in which it is read into a data frame using jsonlite::read_json
.