-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle unnamed data.frames like jsonlite. Fixes #11
- Loading branch information
1 parent
c72d40d
commit cd28d2e
Showing
4 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: yyjsonr | ||
Type: Package | ||
Title: Fast JSON, GeoJSON and NDJSON Parsing and Serialisation | ||
Version: 0.1.7 | ||
Version: 0.1.8 | ||
Authors@R: c( | ||
person("Mike", "FC", role = c("aut", "cre"), email = "[email protected]"), | ||
person("Yao", "Yuan", role = "cph", email = "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
|
||
|
||
test_that("data.frames without column names work like jsonlite", { | ||
|
||
# output an array of arrays. | ||
# the inner array represents a row of the data.frame | ||
|
||
aa <- data.frame(x = 1:2, y = c('y', 'n')) | ||
colnames(aa) <- NULL | ||
|
||
s <- write_json_str(aa) | ||
expect_equal(s, '[[1,"y"],[2,"n"]]') | ||
|
||
}) |