Skip to contents

This function lets the user transform a JSON string into vector (data.frame with 1 row). You can also pass a Python's dictionary. For any other JSON transformation, jsonlite is recommended.

Usage

json2vector(json)

Arguments

json

Character. JSON string.

Value

List, data.frame, or vector. Depends on the json string.

Examples

json2vector('{"id": 1, "nodata": null, "gender": "M"}')
#>   id nodata gender
#> 1  1   <NA>      M