Convert BioCompute Object or domain to JSON string

convert_json(x, pretty = TRUE, auto_unbox = TRUE, na = "string", ...)

Arguments

x

BioCompute Object or domain

pretty

Prettify the JSON string? Default is TRUE.

auto_unbox

Unbox all atomic vectors of length 1? Default is TRUE.

na

How to represent NA values: must be "null" or "string". Default is "string".

...

Additional parameters for toJSON.

Value

JSON string of the BioCompute Object

Examples

compose_description() %>% convert_json()
#> {
#>   "keywords": [],
#>   "xref": [],
#>   "platform": [
#>     "Seven Bridges Platform"
#>   ],
#>   "pipeline_steps": []
#> } 
generate_example("minimal") %>% convert_json()
#> {
#>   "spec_version": "https://w3id.org/biocompute/1.4.2/",
#>   "object_id": "id",
#>   "etag": "496f1a5c9693811984714b0647914929c5bc29c8e7a18ad2a0276f82b11a42ce",
#>   "provenance_domain": {
#>     "name": [],
#>     "version": [],
#>     "review": [],
#>     "derived_from": [],
#>     "obsolete_after": [],
#>     "embargo": [],
#>     "created": [],
#>     "modified": [],
#>     "contributors": [],
#>     "license": []
#>   },
#>   "usability_domain": [],
#>   "extension_domain": {
#>     "fhir_extension": [],
#>     "scm_extension": []
#>   },
#>   "description_domain": {
#>     "keywords": [],
#>     "xref": [],
#>     "platform": [
#>       "Seven Bridges Platform"
#>     ],
#>     "pipeline_steps": []
#>   },
#>   "execution_domain": {
#>     "script": [],
#>     "script_driver": [],
#>     "software_prerequisites": [],
#>     "external_data_endpoints": [],
#>     "environment_variables": []
#>   },
#>   "parametric_domain": [],
#>   "io_domain": {
#>     "input_subdomain": [],
#>     "output_subdomain": []
#>   },
#>   "error_domain": {
#>     "empirical_error": [],
#>     "algorithmic_error": []
#>   }
#> }