Learn R Programming

json64 (version 0.1.3)

j_decode: Decoding Function

Description

Used to decode a base64 string. By default the function expects an encoded json.

Usage

j_decode(str, json = TRUE)

Arguments

str

The string to be decoded.

json

Defaults to TRUE. If TRUE, the function expects str to be an encoded json and will return a data.frame or list, depending on JSON structure. If FALSE, the function will return an string.

Examples

Run this code
# NOT RUN {
# Decode an encoded string:

str <- "SGVsbG8gV29ybGQh"
j_decode(str, json = FALSE)

# Decode an encoded json:

encoded_json <- "W3sibXNnIjogIkhlbGxvIFdvcmxkISIsICJqc29uIjogdHJ1ZX1d"
j_decode(encoded_json)
# }

Run the code above in your browser using DataLab