-
Notifications
You must be signed in to change notification settings - Fork 33
Migrate from RJSONIO to jsonlite (#193) #291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add comprehensive validation tests for jsonlite compatibility before migrating from RJSONIO. These tests verify jsonlite with auto_unbox=TRUE can handle all animint2 data structures. Tests validate: - Single value encoding without array wrapping - Vector arrays preservation - Nested geom structures (plot.json format) - Layout data with boolean arrays - Axis, grid, selector, and panel data - Complete export.data round-trip - Valid JSON output for JavaScript parsing - Numeric precision preservation All 44 validation tests pass, confirming jsonlite is ready for migration. Actual code migration will follow in next commit. Also adds jsonlite to Suggests in DESCRIPTION for testing. Part of #193 - RJSONIO deprecation migration
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #291 +/- ##
==========================================
+ Coverage 73.06% 77.68% +4.62%
==========================================
Files 164 164
Lines 8758 8758
Branches 0 554 +554
==========================================
+ Hits 6399 6804 +405
+ Misses 2359 1954 -405
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replace RJSONIO with jsonlite in DESCRIPTION, NAMESPACE, and all code. Use auto_unbox=TRUE and force=TRUE for toJSON, simplifyVector=FALSE for fromJSON. All tests pass. Closes #193
02a11ef to
e2b41bd
Compare
|
No obvious timing issues in HEAD=migrate-rjsonio-to-jsonlite Generated via commit bbcc1e7 Download link for the artifact containing the test results: ↓ atime-results.zip
|
also converts named numeric and integer vectors to JSON objects. This was causing 349 test failures in JS_coverage and R_coverage.
Without this parameter, jsonlite outputs {} instead of null for NULL values.
This was causing JavaScript errors when checking for null values in plot.json
fields like span.rowspan and span.colspan, resulting in 350 test failures
in JS_coverage and R_coverage.


Problem
RJSONIO is no longer maintained on CRAN (issue #193). We need to migrate to jsonlite, which is the modern standard used by Shiny, plotly, and other major R packages.
FIXES:#193
Solution
Commit 1: Validation Tests (Current)
auto_unbox=TRUEproduces correct JSON formatCommit 2: Migration (Coming Next)
auto_unbox=TRUE,dataframe="rows",null="null"Testing