With this module, we would be able to query a JSON document and render the details of the JSON through Views.
The JSON data is not stored in the database(except for the cached content), and would be rendered through Views directly.
The JSON data once retrieved (http request) would be cached and used accordingly. There is a settings page ('/admin/config/user-interface/views-json-source-settings') where the cache duration can be configured.
This module extends the core views plugins to be able to interact with the JSON content and render the data as required (as configured in the views).
Similar to Views XML Backend, but works with JSON data.
Project link
https://www.drupal.org/project/views_json_source
Git instructions
git clone --branch 8.x-1.x https://git.drupalcode.org/project/views_json_source.git
PAReview checklist
https://pareview.sh/pareview/https-git.drupal.org-project-views_json_sou...
| Comment | File | Size | Author |
|---|
Comments
Comment #2
avpadernoThank you for applying! I added the Git instructions for non-maintainer users and the PAReview checklist link. Reviewers will check the project and post comments to list what should be changed.
If you haven't done it, yet, please check the PAReview report and fix what needs to be fixed. There could be some false positives; verify that what reported is correct, before making any change.
Comment #3
elavarasan r commentedREADME.txt file contains some issues related to coding standard.
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
-------------------------------------------------------------------------------
15 | WARNING | Line exceeds 80 characters; contains 82 characters
48 | WARNING | Line exceeds 80 characters; contains 88 characters
50 | WARNING | Line exceeds 80 characters; contains 84 characters
63 | WARNING | Line exceeds 80 characters; contains 81 characters
68 | WARNING | Line exceeds 80 characters; contains 81 characters
89 | WARNING | Line exceeds 80 characters; contains 83 characters
94 | WARNING | Line exceeds 80 characters; contains 83 characters
103 | WARNING | Line exceeds 80 characters; contains 83 characters
108 | WARNING | Line exceeds 80 characters; contains 83 characters
120 | WARNING | Line exceeds 80 characters; contains 91 characters
Comment #4
elavarasan r commentedApply the below patch file for #3.
Comment #5
venugopp commentedThe PAReview issues have been addressed.
Comment #6
shaktikThank you for your contribution!
Review of the 8.x-1.x branch (commit c0ff5c3): looks good to me.
Comment #7
avpadernoThe task of reviewers is pointing out what needs to be change, not providing patches.
Comment #8
wil2091 commentedReviewed 8.x-1.x and looks good to me.
Comment #9
venugopp commentedThank you all for your reviews.
All the problems above have been fixed.
Please review.
Comment #10
wongjn commentedGeneral
views_json_source.info.yml
It should be
core_version_requirement: ^8line not needed if the Drupal only supports Drupal 8. This line is for Drupal >=8.7 and 9. Is there any reason why this module couldn't be compatible with Drupal 9?src/Form/ViewsJsonSourceSettingsForm.php
cache_ttlform element, one should use'#type' => 'number'for a number field instead oftextfieldwith overridden#attributes.cache_ttlform element, consider adding'#min' => 0as I believe a negative TTL would not make sense in this context.cache_ttlform element, consider using an integer for the#sizeparameter.config/schema/views_json_source.schema.yml
Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
Comment #11
wongjn commentedComment #12
venugopp commentedThanks the the feedback. The required & recommended changes are pushed to the branch. Please review.
Comment #13
avpadernoComment #14
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.