Comments (4)
What you're describing seems to be a problem in rstudio viewer. The jsonlite
output seems fine:
> data <- fromJSON("http://pastebin.com/raw.php?i=Zw9cP5ri")
> data$status
$id
[1] 125125
$message
[1] "Uploaded our first investor deck - http://braincontrol.me/presentations/bc-deck-01.pdf - see the story behind the HTML5 Bitcoin Wallet"
$created_at
[1] "2014-02-17T12:53:25Z"
Try using str
and $
to inspect the data, don't rely on rstudio viewer. The viewer can only show tables.
from jsonlite.
I agree - jsonlite
seems to convert JSON objects correctly. This is great news! I checked the data as you recommended and it indeed looks fine.
In regard to using RStudio data viewer, I use it only to browse tabular structures - CSV and data frames. Are you saying that the viewer cannot correctly display data frames with embedded data frames (stored by jsonlite
as lists)? I thought so initially, but it doesn't seem to be the case: http://stackoverflow.com/questions/22172064/meaning-of-c-in-rstudios-data-browser (see the answer's update).
What is so special about status
column that it breaks RStudio data viewer's otherwise correct functionality? Anyway, I'm going to submit an issue report on this problem for RStudio Team.
from jsonlite.
I'm not an expert on rstudio, but there is no obvious way of displaying nested data in a table-view. Hence it is not surprising that rstudio viewer is incapable of displaying nested data frames.
from jsonlite.
Thank you, Jeroen! Just a quick question on jsonlite
. If JSON paginated reply contains pages with different number of attributes (columns), would your recommended approach combine them in a result?
getDataPaginated <- function (page) {
...
data <- jsonlite::fromJSON(startupData, simplifyVector = FALSE)
...
}
getAngelListData <- function () {
pages <- 1:getNumPages()
startups <- lapply(pages, getDataPaginated)
startups <- do.call(c, startups)
startups <- jsonlite:::simplify(startups)
return (startups)
}
from jsonlite.
Related Issues (20)
- One error in tests on PowerPC: test-serializeJSON-S4.R
- Can fromJSON coerce type of variable? HOT 3
- [Documentation] Is toJSON's output minified by default? HOT 1
- jsonlite throws SSL connect error through firewall
- spaces and parenthesis in Json Keys names converted to dots. HOT 4
- Behaviour of `toJSON` with `digits=NA` changed from 1.8.4 -> 1.8.5 HOT 2
- Update tests to newer testthat approach HOT 2
- `toJSON()` enters infinite recursion for `labelled` vectors HOT 2
- Error (data_api.R#313): lexical error: invalid char in json text. HOT 1
- yajl vulnerability: 'yajl_tree_parse' memory leak HOT 2
- Adding "undefined" as option to `na` in `toJSON` HOT 3
- Please enable usage of system yajl library HOT 2
- embedded yajl is vulnerable to CVE-2017-16516 and CVE-2022-24795 HOT 3
- Mutating & erring S3-dispatch attempts
- Title for read_json not consistent with rest of documentation like toJSON, fromJSON
- Negative zeros HOT 2
- `fromJSON()` with nested array
- Option for toJSON() to output a decimal point for all doubles
- Question: Pass-through of character vectors of valid json in toJSON()? HOT 2
- fromJSON does not decode mongo coded dates.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonlite.