{"id":15459550,"url":"https://github.com/jlblcc/json-schema-viewer","last_synced_at":"2025-08-09T19:38:15.586Z","repository":{"id":17186920,"uuid":"19954421","full_name":"jlblcc/json-schema-viewer","owner":"jlblcc","description":"JavaScript tool for visualizing json-schemas","archived":false,"fork":false,"pushed_at":"2022-08-17T15:47:32.000Z","size":1241,"stargazers_count":192,"open_issues_count":9,"forks_count":70,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-12T12:07:02.212Z","etag":null,"topics":["d3js","json-schema","visualization"],"latest_commit_sha":null,"homepage":"jlblcc.github.io/json-schema-viewer","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlblcc.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2014-05-19T19:18:12.000Z","updated_at":"2025-03-27T08:28:57.000Z","dependencies_parsed_at":"2022-08-31T00:01:51.777Z","dependency_job_id":null,"html_url":"https://github.com/jlblcc/json-schema-viewer","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlblcc%2Fjson-schema-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlblcc%2Fjson-schema-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlblcc%2Fjson-schema-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlblcc%2Fjson-schema-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlblcc","download_url":"https://codeload.github.com/jlblcc/json-schema-viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565058,"owners_count":21125417,"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":["d3js","json-schema","visualization"],"created_at":"2024-10-01T23:08:37.946Z","updated_at":"2025-04-13T06:27:48.749Z","avatar_url":"https://github.com/jlblcc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"JSON Schema Viewer [![Build Status](https://travis-ci.org/jlblcc/json-schema-viewer.svg?branch=master)](https://travis-ci.org/jlblcc/json-schema-viewer)\n==================\n\nJavaScript tool for visualizing [json-schemas](http://json-schema.org/),\nincludes validator.\n\nFair warning, the code \"just works\" - it could use a good refactoring. Pull\nrequests welcome. The JSV was built to support a\n[specific use case](https://github.com/adiwg/mdTools), so support for JSON\nschema(draft v4) keywords are added on an as-needed basis. You may also\nnotice a few extensions to the spec, e.g. example, translation, version,\ndeprecated, etc.\n\nThe [demo](http://jlblcc.github.io/json-schema-viewer/) is rendering the\n[mdJson-schemas](https://github.com/adiwg/mdJson-schemas).\nThere's also a [basic example](http://jlblcc.github.io/json-schema-viewer/basic.html)\nwithout the jQuery Mobile interface elements.\n\nJSDocs are [here](http://jlblcc.github.io/json-schema-viewer/docs)\n\nBuilt using:\n - [d3js](http://d3js.org/)\n - [jQUery](http://jquery.com/)\n - [jQUery Mobile](http://jquerymobile.com/)\n - [tv4](http://geraintluff.github.io/tv4/)\n - [FileReader.js](http://bgrins.github.io/filereader.js/)\n - [highlight.js](https://highlightjs.org/)\n - [jsonpointer.js](https://github.com/alexeykuzmin/jsonpointer.js)\n - [Grunt HTML Boiler](https://github.com/mhulse/grunt-html-boiler)\n - [URI.js](https://github.com/medialize/URI.js)\n\n## Installation\n\n 1. Clone repository: `git clone https://github.com/jlblcc/json-schema-viewer.git`\n 2. Enter project directory: `cd json-schema-viewer`\n 3. Install dependencies via Bower: `bower install`\n 4. Install dependencies via NPM: `npm install`\n 5. Build project via Grunt: `grunt`\n    - `grunt dev`:  Development build. This will create dev.html and basic.html\n    in the project root(these files are .gitignored). This build will load all\n    unminified js files individually.\n    - `grunt prod`: Production build. This will create a production version at\n    *./prod/\u003c%= pkg.version %\u003e/\u003c%= now %\u003e/\u003c%= ver %\u003e*. The production version\n    includes concatenated and minified js/css. Note: jQuery/JQuery Mobile are\n    **not** included in the js builds. The *prod* directory is also .gitignored.\n 6. Serve with your favorite web server:\n    - Use `grunt connect:server:keepalive` to start a basic server at http://localhost:9001\n    - [example basic nginx config](https://gist.github.com/foxxyz/0b978dcea9b95f94aa3e)\n    - Python: `python -m SimpleHTTPServer 9001`\n    - php 5.4+: `php -S localhost:9001`\n\n## Use in Browser\n```js\n          (function($) {\n\n            var loc = window.location;\n            //if not already set, set the root schema location\n            //this allows dev ENV to override the schema location\n            var schema = JSV.schema ? JSV.schema : loc.origin + loc.pathname.substring(0, loc.pathname.lastIndexOf('/') + 1) + 'schemas/schema/schema.json';\n\n            JSV.init({\n              schema : schema,\n              plain : true, //don't use JQM\n              viewerHeight : $('#main-body').height(), //set initial dimensions of SVG\n              viewerWidth : $('#main-body').width()\n            }, function() {\n              $('#jsv-tree').css('width', '100%');\n              //set diagram width to 100%, this DOES NOT resize the svg container\n              //it will not adjust to window resize, needs a listener to support that\n              JSV.resetViewer();\n              $('#loading').fadeOut('slow');\n            });\n          })(jQuery);\n```\n\nThe `JSV.schema` property must be set to the url of your schema.\n\nExample: http://jlblcc.github.io/json-schema-viewer/basic.html\n\n##Development\n\nEdit the [templates](https://github.com/jlblcc/json-schema-viewer/tree/master/templates)\nto modify layout:\n\n - index.html: jQuery Mobile interface. Copied to /dev.html on\n `grunt dev`.\n - basic.html: a basic example without jQuery Mobile or Sass dependency(css\n included in `\u003chead\u003e`).\n - latest.html: redirects to the last production build. Copied to /index.html on\n `grunt prod`.\n\n##Grunt\n\nSee [Gruntfile.js] (https://github.com/jlblcc/json-schema-viewer/blob/master/Gruntfile.js) or\nthe [JSDocs](http://jlblcc.github.io/json-schema-viewer/docs/module-grunt.html)\nfor details on the available Grunt tasks. `grunt --help` will also list available\ntasks.\n\n\nThis project was inspired by [robschmuecker’s block #7880033](http://bl.ocks.org/robschmuecker/7880033).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlblcc%2Fjson-schema-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlblcc%2Fjson-schema-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlblcc%2Fjson-schema-viewer/lists"}