{"id":13533024,"url":"https://github.com/dougbarth/jsonlint","last_synced_at":"2025-04-01T21:31:40.033Z","repository":{"id":18298533,"uuid":"21473034","full_name":"dougbarth/jsonlint","owner":"dougbarth","description":"Checks JSON files for correct syntax and no silly mistakes","archived":false,"fork":false,"pushed_at":"2023-04-12T13:34:58.000Z","size":50,"stargazers_count":19,"open_issues_count":10,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-25T07:02:15.584Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/dougbarth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2014-07-03T18:37:50.000Z","updated_at":"2024-06-06T07:08:32.082Z","dependencies_parsed_at":"2024-06-06T07:18:31.346Z","dependency_job_id":null,"html_url":"https://github.com/dougbarth/jsonlint","commit_stats":{"total_commits":53,"total_committers":8,"mean_commits":6.625,"dds":"0.37735849056603776","last_synced_commit":"f817a0b401748d500a833b08f7ab160c4c13b9c1"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dougbarth%2Fjsonlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dougbarth%2Fjsonlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dougbarth%2Fjsonlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dougbarth%2Fjsonlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dougbarth","download_url":"https://codeload.github.com/dougbarth/jsonlint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246713191,"owners_count":20821853,"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-01T07:01:15.921Z","updated_at":"2025-04-01T21:31:39.641Z","avatar_url":"https://github.com/dougbarth.png","language":"Ruby","readme":"# jsonlint\n\n[![Ruby](https://github.com/dougbarth/jsonlint/actions/workflows/ruby.yml/badge.svg)](https://github.com/dougbarth/jsonlint/actions/workflows/ruby.yml)\n[![Gem Version](http://img.shields.io/gem/v/jsonlint.svg)](https://rubygems.org/gems/jsonlint)\n\njsonlint checks your JSON files for syntax errors or silly mistakes. Currently it checks for:\n\n * Valid JSON syntax\n * Overlapping key definitions in JSON files, where the last definition would win\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'jsonlint'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install jsonlint\n\n## CLI Usage\n\nYou can run jsonlint against a set of files in the command line. Any errors will be printed and the process will exit with a non-zero exit code.\n\n```\n$ jsonlint spec/data/*\nspec/data/deep_overlap.json\n  The same key is defined twice: foo.bar\nspec/data/missing_brace.json\n  Hash/Object not terminated at line 5, column 2 [sparse.c:782]\nspec/data/missing_comma.json\n  expected comma, not a string at line 3, column 8 [sparse.c:386]\nspec/data/overlapping_keys.json\n  The same key is defined twice: foo\n```\n\n## Rake task\n\nYou can integrate jsonlint into your build process by adding a Rake task to your project\n\n```ruby\nrequire 'jsonlint/rake_task'\nJsonLint::RakeTask.new do |t|\n  t.paths = %w(\n    spec/**/*.json\n  )\nend\n```\n\nThen run the rake task.\n\n```\n$ rake jsonlint\nspec/data/deep_overlap.json\n  The same key is defined twice: foo.bar\nspec/data/missing_brace.json\n  Hash/Object not terminated at line 5, column 2 [sparse.c:782]\nspec/data/missing_comma.json\n  expected comma, not a string at line 3, column 8 [sparse.c:386]\nspec/data/overlapping_keys.json\n  The same key is defined twice: foo\n```\n\n### Rake task options\n\nAdd these options similarly to the path option seen above.\n\n| Option | Description | Default |\n| ------------- | ------------- | ------------- |\n| `exclude_paths` | List of files or paths to exclude from linting | `nil` |\n| `fail_on_error` | Continue on to the next rake task when false and don't fail even if JsonLint finds errors | `true` |\n| `log_level` | Logger level (DEBUG, INFO, WARN, ERROR, FATAL, or UNKNOWN) | `INFO` |\n| `paths` | List of files or paths to lint | `nil` |\n\n## Contributing\n\n1. Fork it ( https://github.com/dougbarth/jsonlint/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","funding_links":[],"categories":["Awesome Ruby CLIs"],"sub_categories":["Linting"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdougbarth%2Fjsonlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdougbarth%2Fjsonlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdougbarth%2Fjsonlint/lists"}