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...
Lardy asked 6/12, 2016 at 16:22

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 ...
Brainstorm asked 19/8, 2015 at 17:48

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...
Sakhuja asked 9/5, 2019 at 6:5

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...
Mathre asked 12/5, 2020 at 10:11

1

Consider this shiny app: library(shiny) library(ggplot2) ui <- fluidPage( radioButtons("type", "Type of plot", choices = c("density", "boxplot")), plotOutput("plot") ) server <- function...
Shifflett asked 18/10, 2019 at 9:40

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...
Aulos asked 5/5, 2015 at 0:39

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...
Eby asked 5/4, 2017 at 23:38

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...
Felton asked 28/11, 2019 at 15:30

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 ...
Silesia asked 3/9, 2018 at 12:50

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 &...
Ravine asked 8/5, 2018 at 19:23

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...
Perpetuity asked 21/9, 2017 at 18:8

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...
Enlistee asked 4/3, 2017 at 6:4

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) ---...
Kristynkrock asked 23/10, 2014 at 0:38

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...
Cymatium asked 2/5, 2015 at 1:19

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...
Task asked 8/6, 2016 at 16:0

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...
Tamaratamarack asked 9/8, 2016 at 18:52

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...
Stereochemistry asked 10/7, 2016 at 2:54

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...
Tonyatonye asked 23/6, 2016 at 16:37

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...
Rett asked 16/2, 2016 at 23:20

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...
Wrack asked 14/11, 2014 at 20:49

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...
Drysalt asked 7/10, 2014 at 20:58

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...
Bettinabettine asked 16/5, 2014 at 22:21
1

© 2022 - 2024 — McMap. All rights reserved.