This function converts an allometric model or publication into a JSON representation. Primarily, this is used internally to populate a remotely hosted MongoDatabase.

toJSON(object, ...)

Arguments

object

An allometric model or publication

...

Additional arguments passed to jsonlite::toJSON

Value

A string containing the JSON representation of the object

Examples

toJSON(brackett_rubra)
#> {"model_id":"2a97d7ba","pub_id":"brackett_1977","model_type":"stem volume","model_class":"FixedEffectsModel","response":{"name":"vsia","unit":"ft3"},"covariates":[{"name":"dsob","unit":"in"},{"name":"hst","unit":"ft"}],"descriptors":{"country":["US"],"region":["US-WA"],"geographic_region":[],"age_class":[],"taxa":[{"family":["Betulaceae"],"genus":["Alnus"],"species":["rubra"]}]},"parameters":{"a":-2.672775,"b":1.920617,"c":1.074024},"predict_fn_body":["10^a * dsob^b * hst^c"]}