Learn R Programming

rjson (version 0.1.0)

fromJSON: Convert JSON To R

Description

Convert a JSON object into an R object.

Usage

fromJSON( json_str )

Arguments

json_str
a JSON object to convert

Value

  • R object that corresponds to the JSON object

See Also

toJSON

Examples

Run this code
#watch out for R turning null into FALSE
fromJSON( "[true, false, null]" )
##[1]  TRUE FALSE __FALSE__

#but if you use a hash, this will be avoided
fromJSON( '{"a":true, "b":false, "c":null}' )

Run the code above in your browser using DataLab