{"id":13652686,"url":"https://github.com/mohsen1/json-formatter","last_synced_at":"2025-10-23T17:19:42.228Z","repository":{"id":19304227,"uuid":"22541875","full_name":"mohsen1/json-formatter","owner":"mohsen1","description":"Angular directive for collapsible JSON in HTML ","archived":false,"fork":false,"pushed_at":"2020-10-17T13:42:18.000Z","size":1571,"stargazers_count":372,"open_issues_count":21,"forks_count":85,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-29T16:12:22.810Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://azimi.me/json-formatter/demo/demo.html","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/mohsen1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-02T07:59:06.000Z","updated_at":"2025-02-21T22:24:02.000Z","dependencies_parsed_at":"2022-08-03T15:10:13.083Z","dependency_job_id":null,"html_url":"https://github.com/mohsen1/json-formatter","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohsen1%2Fjson-formatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohsen1%2Fjson-formatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohsen1%2Fjson-formatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohsen1%2Fjson-formatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohsen1","download_url":"https://codeload.github.com/mohsen1/json-formatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253428152,"owners_count":21906861,"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-08-02T02:01:01.690Z","updated_at":"2025-10-06T14:49:47.391Z","avatar_url":"https://github.com/mohsen1.png","language":"JavaScript","funding_links":[],"categories":["Frontend components"],"sub_categories":[],"readme":"# JSON Formatter\n[![Build Status](https://travis-ci.org/mohsen1/json-formatter.svg?branch=master)](https://travis-ci.org/mohsen1/json-formatter)\n[![Code Climate](https://codeclimate.com/github/mohsen1/json-formatter/badges/gpa.svg)](https://codeclimate.com/github/mohsen1/json-formatter)\n\nJSON Formatter is an AngularJS directive for rendering JSON objects in HTML with a **collapsible** navigation.\n\n[![Screebshot](./screenshot.png)](http://azimi.me/json-formatter/demo/demo.html)\n\n#### [Now also available in pure JavaScript with zero dependency!](https://github.com/mohsen1/json-formatter-js)\n\n## Usage\n\n* Install via Bower or npm\n\n  ```bash\n  bower install json-formatter --save\n  ```\n  ...or\n\n  ```bash\n  npm install jsonformatter --save\n  ```\n* Add `jsonFormatter` to your app dependencies\n\n  ```js\n  angular.module('MyApp', ['jsonFormatter'])\n  ```\n* Use `\u003cjson-formatter\u003e` directive\n\n  ```html\n  \u003cjson-formatter json=\"{my: 'json'}\" open=\"1\"\u003e\u003c/json-formatter\u003e\n  ```\n* `open` attribute accepts a number which indicates how many levels rendered JSON should be opened\n\n#### Configuration\n\nYou can use `JSONFormatterConfig` provider to configure JOSN Formatter.\n\nAvailable configurations\n\n##### Hover Preview\n* `hoverPreviewEnabled`: enable preview on hover\n* `hoverPreviewArrayCount`: number of array items to show in preview Any array larger than this number will be shown as `Array[XXX]` where `XXX` is length of the array.\n* `hoverPreviewFieldCount`: number of object properties to show for object preview. Any object with more properties that thin number will be truncated.\n\nExample using configuration\n\n```js\napp.config(function (JSONFormatterConfigProvider) {\n\n  // Enable the hover preview feature\n  JSONFormatterConfigProvider.hoverPreviewEnabled = true;\n});\n```\n\n## Demo\nSee [Examples here](http://azimi.me/json-formatter/demo/demo.html)\n\n\n## Known Bugs\n##### `hashKey`\n\nIf you are iterating in an array of objects using `ng-repeat`, make sure you are using `track by $index` to avoid adding extra `$$hashKey` to your objects.\n\n## Browser Support\nAll modern browsers are supported. Lowest supported version of Internet Explorer is **IE9**.\n\n## License\n\nApache 2.0\n\nSee [LICENSE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohsen1%2Fjson-formatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohsen1%2Fjson-formatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohsen1%2Fjson-formatter/lists"}