json
Parse JavaScript Object Notation Values into Objects

Description

Converts a value in JavaScript Object Notation (JSON) into objects.

Usage

json.parse(string)
json.format(obj)

Arguments

string a character string containing the text of the JSON value.
obj an R object representing the value to format using JSON.
Value
For json.parse, returns R objects representing the JSON value. JSON objects are converted into lists of class JsonObject, and JSON arrays are converted into lists of class JsonArray.
For json.format, returns a character string with the JSON representation of the R object.
References
JSON.org
Examples
val <- json.parse("{\"a\":1,\"b\":false,\"c\":true,\"d\":null,\"e\":\"letter\",\"f\":[1,2,4,8,16],\"g\":{\"h\":10,\"i\":20}}")
json.format(val)
Package terrUtils version 6.1.4-13
Package Index