jsonlite Questions
8
Here is an example of the code I'm using:
library(jsonlite)
library(curl)
#url
url = "http://www.zillow.com/search/GetResults.htm?spt=homes&status=001000&lt=000000&ht=010000&pr=9...
2
Solved
I'm sending data to a C# developer who wants to use http://json2csharp.com/ to convert my data string into an array of objects. I thought that the jsonlite package would be good for this, but he's ...
2
Solved
I am converting a nested list of a specific structure (required by an API) to JSON using toJSON() in jsonlite. However, I need the final JSON to not contain the outer square brackets (also required...
2
I'm learning how to fetch data using an API in R. I understand that the aim of httr is to provide a wrapper for the curl package.
The documentation I'm following so that I make requests to the API...
1
Consider this shiny app:
library(shiny)
library(ggplot2)
ui <- fluidPage(
radioButtons("type", "Type of plot", choices = c("density", "boxplot")),
plotOutput("plot")
)
server <- function...
2
Solved
I have json files with data for countries. One of the files has the following data:
"[{\"count\":1,\"subject\":{\"name\":\"Namibia\",\"alpha2\":\"NA\"}}]"
I have the following code convert the j...
1
I am struggling to create a nested/hierarchical JSON file. In reality, my file will have varying numbers of children at different levels (from zero children to several), and each "node" in the tree...
1
Solved
I need to convert a dataframe to JSON. There are several nested dataframes as variables in the dataframe to convert to JSON.
But, when converting to JSON, I need the data for Values1 described be...
1
Solved
I am trying to split a large JSONL(.gz) file into a number of .csv files. I have been able to use the code below to create a working .csv file, for the first 25.000 entries. I now want to read and ...
3
Solved
I'm trying to import a geojson into R as a spatial object (i.e., sp) from a USGS web service (streamstats) and am having trouble getting it into the right format for R.
library(jsonlite)
mydata &...
2
Solved
I have the following R data frame:
Values
Type1 123
Type2 4565
Type3 7812
I expect the JSON output to be
{"Type1":123, "Type2":4565, "Type3":7812}
The number field can w/wo quote
I used js...
2
I need to send response from R using plumber package in below format
{
"status": "SUCCESS",
"code": "200",
"output": {
"studentid": "1001",
"name": "Kevin"
}
}
But I am getting below forma...
3
Solved
I'm trying to read a JSON file into R but I got this error:
Error in parseJSON(txt) : parse error: trailing garbage
[ 33.816101, -117.979401 ] } { "a": "Mozilla\/4.0 (compatibl
(right here) ---...
2
Solved
I am trying to convert JSON pulled from an API into a data frame in R, so that I can use and analyze the data.
#Install needed packages
require(RJSONIO)
require(httr)
#request a list of companie...
1
Solved
Where does one get jsonlite? Apparently it is missing from CRAN?
> install.packages('jsonlite')
Gives:
Installing package into ‘C:/Users/cbusch/Documents/R/win-library/3.2’
(as ‘lib’ is unsp...
1
Solved
I have a log file that look like this. This is a text document that looks like:
Id,Date,Level,Message
35054,2016-06-17 19:29:43 +0000,INFO,"{
""id"": -2,
""ipAd...
1
Solved
I am trying to encode R lists into json using the jsonlite package and the toJSON function. I have a simple item like:
list(op='abc')
I'd like that to become:
{
"op" : "abc"
}
Instead, I get...
1
Solved
How might I parse and process JSON that already lives inside a data frame?
Sample data:
df <- data.frame(
id = c("x1", "x2"),
y = c('[{"Property":"94","Value":"Error"},{"Property":"C1","Va...
4
I am trying to load a json file into a data.frame in r. I have had some luck with the fromJSON function in the jsonlite package - But am getting nested lists and am not sure how to flatten the inpu...
1
Solved
With PostgreSQL 9.4 a new datatype JSONB has become available. According to the performance tests made available on a single node the performance is better than with mongodb (which understandably i...
Womanize asked 2/7, 2015 at 11:38
1
I am trying to read multiple json files into a working directory for further converting into a dataset. I have files text1, text2, text3 in the directory json. Here is the code i wrote:
setwd("Us...
1
Solved
I'm attempting to read the following JSON file ("my_file.json") into R, which contains the following:
[{"id":"484","comment":"They call me "Bruce""}]
using the jsonlite package (0.9.12), the fol...
1
Solved
I'm working on a few functions to get data from StatBank Denmark, and their API. They have made a console to test JSON calls and I know the basic_request I parse to JSON in the function dst_get_dat...
1
© 2022 - 2024 — McMap. All rights reserved.