{"id":16162109,"url":"https://github.com/peterdavehello/docker-jsonlint","last_synced_at":"2025-03-18T22:30:57.762Z","repository":{"id":36352537,"uuid":"198434513","full_name":"PeterDaveHello/docker-jsonlint","owner":"PeterDaveHello","description":"🐳 Dockerized jsonlint with proper versioning, a JSON parser and validator.","archived":false,"fork":false,"pushed_at":"2024-12-15T06:27:22.000Z","size":14,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T00:08:01.755Z","etag":null,"topics":["ci","cli","container","continuous-integration","docker","docker-image","hacktoberfest","image","json","jsonlint","lint","linter"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/peterdavehello/jsonlint/","language":"Shell","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/PeterDaveHello.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2019-07-23T13:18:15.000Z","updated_at":"2025-03-02T15:12:52.000Z","dependencies_parsed_at":"2024-12-09T19:25:14.618Z","dependency_job_id":"c761e7ec-e76f-4fe7-8a51-de3addf20574","html_url":"https://github.com/PeterDaveHello/docker-jsonlint","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fdocker-jsonlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fdocker-jsonlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fdocker-jsonlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fdocker-jsonlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeterDaveHello","download_url":"https://codeload.github.com/PeterDaveHello/docker-jsonlint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244318449,"owners_count":20433907,"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":["ci","cli","container","continuous-integration","docker","docker-image","hacktoberfest","image","json","jsonlint","lint","linter"],"created_at":"2024-10-10T02:29:05.311Z","updated_at":"2025-03-18T22:30:57.447Z","avatar_url":"https://github.com/PeterDaveHello.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-jsonlint\n\n[![Build Status](https://app.travis-ci.com/PeterDaveHello/docker-jsonlint.svg?branch=master)](https://app.travis-ci.com/PeterDaveHello/docker-jsonlint)\n[![Docker Hub pulls](https://img.shields.io/docker/pulls/peterdavehello/jsonlint.svg)](https://hub.docker.com/r/peterdavehello/jsonlint/)\n\n[![Docker Hub badge](http://dockeri.co/image/peterdavehello/jsonlint)](https://hub.docker.com/r/peterdavehello/jsonlint/)\n\nDockerized [jsonlint](https://github.com/zaach/jsonlint) with various versions, easy to use and easy to integrate with CI.\n\n## Table of Contents\n\n- [Usage](#usage)\n  - [Command line](#command-line)\n    - [Use latest version](#use-latest-version)\n    - [Use specific version](#use-specific-version)\n  - [Continuous Integration (CI)](#continuous-integration-ci)\n    - [Travis CI](#travis-ci)\n    - [GitLab CI](#gitlab-ci)\n- [jsonlint cli usage](#jsonlint-cli-usage)\n- [Build](#build)\n\n## Usage\n\n### Command line\n\n#### Use latest version\n\n```sh\ndocker run --rm -v $PATH_TO_JSON:/json peterdavehello/jsonlint jsonlint -q JSON_FILE.json\n\n# Please replace \"$PATH_TO_JSON\" with your custom path,\n# and replace \"JSON_FILE.json\" with your real json file filename.\n```\n\n#### Use specific version\n\nJust like above, but you can specify version of jsonlint, for example:\n\n```sh\ndocker run --rm -v $PATH_TO_JSON:/json peterdavehello/jsonlint:1.6.3 jsonlint -q JSON_FILE.json\n\n# Please replace \"1.6.3\" with the version number you want.\n# Don't forget to replace \"$PATH_TO_JSON\" \u0026 \"JSON_FILE.json\".\n```\n\n### Continuous Integration (CI)\n\n#### Travis CI\n\nEnable Docker service in your `.travis.yml`:\n\n```yaml\nservices:\n  - docker\n```\n\nAnd use the same command in the `scripts` part as the command line mentions, for example:\n\n```yaml\nservices:\n  - docker\n\nscripts:\n  - docker run --rm -v $TRAVIS_BUILD_DIR:/json peterdavehello/jsonlint:1.6.3 jsonlint -q example.json\n```\n\nThis will lint a example json file called `example.json`\n\n#### GitLab CI\n\nAdd this block to your `.gitlab-ci.yml`:\n\n```yaml\njsonlint:\n  stage: lint\n  variables:\n    jsonlint_version: \"1.6.3\"\n  image: peterdavehello/jsonlint:$jsonlint_version\n  only:\n    changes:\n      - \"**/*.json\"\n  script:\n    - find . -name \"*.json\" | xargs -n 1 jsonlint -q\n```\n\nReplace \"1.6.3\" with the version you want to use, you can also use \"latest\" for the very new version.\n\n## jsonlint cli usage\n\nJust pass `-h`/`--help` to jsonlint to get its help message, for example:\n\n```sh\n$ docker run --rm peterdavehello/jsonlint jsonlint --help\n\nUsage: jsonlint [file] [options]\n\nfile     file to parse; otherwise uses stdin\n\nOptions:\n   -v, --version            print version and exit\n   -s, --sort-keys          sort object keys\n   -i, --in-place           overwrite the file\n   -t CHAR, --indent CHAR   character(s) to use for indentation  [  ]\n   -c, --compact            compact error display\n   -V, --validate           a JSON schema to use for validation\n   -e, --environment        which specification of JSON Schema the validation file uses  [json-schema-draft-03]\n   -q, --quiet              do not print the parsed json to STDOUT  [false]\n```\n\nFor more details, check out the [jsonlint project](https://github.com/zaach/jsonlint) page.\n\n## Build\n\nBuild command, you need to specify a valid jsonlint version argument to `jsonLINT_VERSION`:\n\n```sh\ndocker build --build-arg JSONLINT_VERSION=\"1.6.3\" -t docker-jsonlint .\n\n# Replace \"docker-jsonlint\" with the preferred image name\n```\n\nYou can find a valid version on [jsonlint](https://www.npmjs.com/package/jsonlint?activeTab=versions) npm registry page, or just poke the [registry](https://registry.npmjs.org/jsonlint) to retrieve more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdavehello%2Fdocker-jsonlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterdavehello%2Fdocker-jsonlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdavehello%2Fdocker-jsonlint/lists"}