{"id":16571802,"url":"https://github.com/hrbrmstr/jsonview","last_synced_at":"2025-03-23T14:31:00.380Z","repository":{"id":141238407,"uuid":"50214380","full_name":"hrbrmstr/jsonview","owner":"hrbrmstr","description":"JSON pretty printer \u0026 viewer in R","archived":false,"fork":false,"pushed_at":"2018-11-14T15:30:21.000Z","size":1471,"stargazers_count":29,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T20:54:26.308Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrbrmstr.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-22T23:39:20.000Z","updated_at":"2024-11-04T13:36:08.000Z","dependencies_parsed_at":"2024-08-19T03:02:55.923Z","dependency_job_id":null,"html_url":"https://github.com/hrbrmstr/jsonview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fjsonview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fjsonview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fjsonview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fjsonview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrbrmstr","download_url":"https://codeload.github.com/hrbrmstr/jsonview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245115670,"owners_count":20563207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T21:25:19.265Z","updated_at":"2025-03-23T14:31:00.325Z","avatar_url":"https://github.com/hrbrmstr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput:\n  html_document:\n    keep_md: true\n  md_document:\n    variant: markdown_github\n---\n\n`jsonview` : View formatted and \"pretty printed\" JSON or `list`s in R\n\n(if you need XML viewing in R check out `jsonview`'s sister package, [xmlview](https://github.com/hrbrmstr/xmlview))\n\nIt is intended for interactive use. When working with gnarly lists or JSON data, it's often times advantageous to be able to see the document in a more formatted way.\n\nYou can pass in:\n\n- plain character JSON\n- an R `list` object (any R object, really)\n\nand view the formatted \u0026 pretty-printed result in the RStudio viewer or web browser.\n\nHere's an example of the collapsable tree view generaged by:\n```{r eval=FALSE}\njson_tree_view(fromJSON(\"https://collector.torproject.org/index/index.json\"))\n```\n\n![](jsonview.png)\n\nThe widget uses  [vkbeautify](http://www.eslinstructor.net/vkbeautify/), [highlight.js](https://highlightjs.org) and \n[jquery.json-treeview](https://github.com/bazh/a.json-view) to do all the work.\n\nThe following functions are implemented:\n\n- `json_view`: view JSON, formatted \u0026 pretty-printed\n- `json_tree_view`: view JSON in a collapsable tree view\n\n### News\n\n- Version 0.2.0 : `json_tree_view()`\n- Version 0.1.0 released\n\n### Installation\n\n```{r eval=FALSE}\ndevtools::install_github(\"hrbrmstr/jsonview\")\n```\n\n```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}\noptions(width=120)\n```\n\n### Usage\n\n```{r eval=FALSE}\nlibrary(xmlview)\nlibrary(jsonlite)\n\n# available styles\nhighlight_styles()\n\n# plain character\ntxt \u003c- '{\n\"glossary\": {\n\"title\": \"example glossary\",\n\"GlossDiv\": {\n\"title\": \"S\",\n\"GlossList\": {\n\"GlossEntry\": {\n\"ID\": \"SGML\",\n\"SortAs\": \"SGML\",\n\"GlossTerm\": \"Standard Generalized Markup Language\",\n\"Acronym\": \"SGML\",\n\"Abbrev\": \"ISO 8879:1986\",\n\"GlossDef\": {\n\"para\": \"A meta-markup language, used to create markup languages such as DocBook.\",\n\"GlossSeeAlso\": [\"GML\", \"XML\"]\n},\n\"GlossSee\": \"markup\"\n}\n}\n}\n}\n}'\n  \njson_view(txt)\njson_tree_view(txt)\n\ndoc \u003c- fromJSON(txt)\njson_view(doc, style=\"obsidian\")\njson_tree_view(doc)\n\njson_view(readLines(\"https://collector.torproject.org/index/index.json\", warn=FALSE))\n\njson_tree_view(readLines(\"https://collector.torproject.org/index/index.json\", warn=FALSE))\n\njson_tree_view(fromJSON(\"https://collector.torproject.org/index/index.json\"))\n\njson_view(fromJSON(\"https://collector.torproject.org/index/index.json\",\n                   simplifyVector=FALSE))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fjsonview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrbrmstr%2Fjsonview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fjsonview/lists"}