{"id":25802927,"url":"https://github.com/twp0217/ngx-json-view","last_synced_at":"2025-02-27T17:36:48.474Z","repository":{"id":57148781,"uuid":"89787013","full_name":"twp0217/ngx-json-view","owner":"twp0217","description":"A JSON View component for Angular 2+ (基于angular 2+ 的JSON展示组件)","archived":false,"fork":false,"pushed_at":"2019-07-02T13:50:59.000Z","size":246,"stargazers_count":3,"open_issues_count":1,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T02:39:45.176Z","etag":null,"topics":["angular","angular2","angular4","json","json-view","ngx-json-view"],"latest_commit_sha":null,"homepage":"https://twp0217.github.io/ngx-json-view/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twp0217.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-29T13:27:31.000Z","updated_at":"2025-01-03T01:29:21.000Z","dependencies_parsed_at":"2022-08-31T20:02:36.765Z","dependency_job_id":null,"html_url":"https://github.com/twp0217/ngx-json-view","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Fngx-json-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Fngx-json-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Fngx-json-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Fngx-json-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twp0217","download_url":"https://codeload.github.com/twp0217/ngx-json-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241039563,"owners_count":19898707,"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":["angular","angular2","angular4","json","json-view","ngx-json-view"],"created_at":"2025-02-27T17:36:47.784Z","updated_at":"2025-02-27T17:36:48.468Z","avatar_url":"https://github.com/twp0217.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngx-json-view\nA JSON View component for Angular 2+ (基于angular 2+ 的JSON展示组件)\n\n## 安装\n\n```\nnpm install @twp0217/ngx-json-view --save\n```\n\n## 使用\n- 安装依赖包：`@twp0217/ngx-json-view`\n\n```\nnpm install @twp0217/ngx-json-view --save\n```\n\n- 在module导入`NgxJsonViewModule`\n\n```\nimport { NgxJsonViewModule } from '@twp0217/ngx-json-view';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    FormsModule,\n    HttpModule,\n    NgxJsonViewModule\n  ],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\n- 准备JSON数据\n\n```\ndata: { [key: string]: any } = {\n  \"name\": \"twp0217\",\n  \"url\": \"https://github.com/twp0217\",\n  \"string\": \"github\",\n  \"number\": 88,\n  \"boolean\": true,\n  \"object\": {\n      \"obj1\": \"obj1\",\n      \"obj2\": \"obj2\",\n      \"object\": {\n          \"obj11\": \"obj11\",\n          \"obj22\": \"obj22\"\n      },\n      \"emptyArray\": []\n  },\n  \"array\": [\n      1,\n      2,\n      3\n  ],\n  \"date\": new Date(),\n  \"null\": null\n};\n```\n\n- 在模板页面使用\n\n```\n\u003cngx-json-view [data]=\"data\"\u003e\u003c/ngx-json-view\u003e\n```\n\n# 文档\n- `data` - `{ [key: string]: any }` - 数据\n- `levelOpen` - `number` - 初始化展开层数\n\n# 支持\n\n- 如果项目对你有帮助，请点颗星:star:，谢谢。\n- 如果你对项目有想法、问题、BUG，欢迎讨论。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwp0217%2Fngx-json-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwp0217%2Fngx-json-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwp0217%2Fngx-json-view/lists"}