{"id":19529906,"url":"https://github.com/loopmode/react-pretty-json","last_synced_at":"2025-02-26T02:43:10.316Z","repository":{"id":140399959,"uuid":"127511089","full_name":"loopmode/react-pretty-json","owner":"loopmode","description":"A react component that pretty-prints JSON data, based on http://jsfiddle.net/unlsj/","archived":false,"fork":false,"pushed_at":"2018-11-09T08:25:03.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T03:05:36.272Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loopmode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2018-03-31T07:50:00.000Z","updated_at":"2020-01-16T15:44:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"12bc5297-d575-47cb-a575-ea4d02a6da15","html_url":"https://github.com/loopmode/react-pretty-json","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/loopmode%2Freact-pretty-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Freact-pretty-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Freact-pretty-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Freact-pretty-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loopmode","download_url":"https://codeload.github.com/loopmode/react-pretty-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240783109,"owners_count":19856776,"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-11-11T01:28:05.156Z","updated_at":"2025-02-26T02:43:10.283Z","avatar_url":"https://github.com/loopmode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-pretty-json\n\nA react component that pretty-prints JSON data, based on http://jsfiddle.net/unlsj.\n\n\u003cimg src=\"https://github.com/loopmode/react-pretty-json/raw/master/example.png\" /\u003e\n\n## Usage\n\n```javascript\nimport React, { Component } from 'react';\nimport PrettyJson from '@loopmode/react-pretty-json';\n\nexport class App extends Component {\n    state = {\n        foo: \"foo\", \n        bar: \"bar\",\n        nested: {\n            stuff: \"we needed a nested value\",\n            some: Immutable.fromJS({\n                data: 'immutable as well!' \n            })\n        }\n    }\n    render() {\n        return (\n            \u003cPrettyJson json={this.state} onError={console.error} /\u003e\n        );\n    }\n}\n\n```\n\n### Props\n\n**json**\n\n`json: PropTypes.oneOfType([PropTypes.object, PropTypes.string])`\n\nEither an object that will be converted to a JSON string, or a JSON string.\nIf it's an object, it will be stringified to JSON first.\nIt is allowed to pass `immutable.js` objects, or mixed objects containing immutables.\n\n\n**onPrettyPrint**\n\n`onPrettyPrint: PropTypes.func`\n\nA function that will be invoked with the prettified `html` string in case of success.\n\n\n**onError**\n\n`onError: PropTypes.func`\n\nA function that will be invoked with the `error` object in case of error.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopmode%2Freact-pretty-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floopmode%2Freact-pretty-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopmode%2Freact-pretty-json/lists"}