# json-parser
A cli tool for lexical and syntactical analysis. It parses json files.
## [PyPI package](https://pypi.org/project/json-parser-cli/)
---
## Features
- Lexical analysis --> tokenize json input character by character.
- Parser --> Builds python objects fro tokens.
- CLI Interface --> Validating json files from cli.
- Error messages with line numbers
- include support for comments also. ('//' and '/* any content */')
- Uploaded on pypi [PyPI package](https://pypi.org/project/json-parser-cli/)
- No runtime dependencies required.
## Installation
```bash
pip install json-parser-cli
```
## How to use
use ```json-parser``` command to validate json files.
```bash
json-parser <file_name.json>
```
## Learnings
How compiler works
1. **Lexer.py** --> Convert text into tokens.
2. **Parser** --> Convert tokens to data using recursive descent parsing.
### Json features supported
- Objects, Arrays.
- Strings, Numbers, Booleans.
- Null, nested structures, etc.
- comments,
<!--
### For my testing
```bash
python3 -m json_parser.test_runner
``` -->
Raw data
{
"_id": null,
"home_page": null,
"name": "json-parser-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "cli, compiler, json, lexer, parser",
"author": null,
"author_email": "Anand Vashishtha <anandcollege07@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/df/b1/e27eaccdd541f4fb35fb40ae6ede9e96206d89e6bc9300f035b4b781cec5/json_parser_cli-0.1.2.tar.gz",
"platform": null,
"description": "# json-parser\nA cli tool for lexical and syntactical analysis. It parses json files.\n## [PyPI package](https://pypi.org/project/json-parser-cli/)\n\n---\n\n## Features\n- Lexical analysis --> tokenize json input character by character.\n- Parser --> Builds python objects fro tokens.\n- CLI Interface --> Validating json files from cli.\n- Error messages with line numbers\n- include support for comments also. ('//' and '/* any content */')\n- Uploaded on pypi [PyPI package](https://pypi.org/project/json-parser-cli/)\n- No runtime dependencies required.\n\n## Installation\n```bash\npip install json-parser-cli\n```\n\n## How to use\nuse ```json-parser``` command to validate json files.\n```bash\njson-parser <file_name.json>\n```\n\n## Learnings\nHow compiler works\n\n1. **Lexer.py** --> Convert text into tokens.\n2. **Parser** --> Convert tokens to data using recursive descent parsing.\n\n### Json features supported\n- Objects, Arrays.\n- Strings, Numbers, Booleans.\n- Null, nested structures, etc.\n- comments, \n\n\n<!-- \n### For my testing\n```bash\npython3 -m json_parser.test_runner\n``` -->",
"bugtrack_url": null,
"license": "MIT",
"summary": "A JSON parser CLI tool",
"version": "0.1.2",
"project_urls": {
"Repository": "https://github.com/Anand-0037/json-parser"
},
"split_keywords": [
"cli",
" compiler",
" json",
" lexer",
" parser"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5e6917cfda00ef219684a8e293c12572e97985a7e32944d0bad422244dc08f7d",
"md5": "c4437849fde4e23d4512614d5186f528",
"sha256": "5f53c547c749563f4e634ebc34aafdf077d94df14924ce482908aa7f490368ef"
},
"downloads": -1,
"filename": "json_parser_cli-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c4437849fde4e23d4512614d5186f528",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 7477,
"upload_time": "2025-07-28T09:30:08",
"upload_time_iso_8601": "2025-07-28T09:30:08.533323Z",
"url": "https://files.pythonhosted.org/packages/5e/69/17cfda00ef219684a8e293c12572e97985a7e32944d0bad422244dc08f7d/json_parser_cli-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "dfb1e27eaccdd541f4fb35fb40ae6ede9e96206d89e6bc9300f035b4b781cec5",
"md5": "e0601620504c1a5bd4510e09fd03910a",
"sha256": "b1a079f0f565f3b8598f227ac811994fbf64ba5b74929dd102f143f99fc5aa6f"
},
"downloads": -1,
"filename": "json_parser_cli-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "e0601620504c1a5bd4510e09fd03910a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 25325,
"upload_time": "2025-07-28T09:30:10",
"upload_time_iso_8601": "2025-07-28T09:30:10.069870Z",
"url": "https://files.pythonhosted.org/packages/df/b1/e27eaccdd541f4fb35fb40ae6ede9e96206d89e6bc9300f035b4b781cec5/json_parser_cli-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-28 09:30:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Anand-0037",
"github_project": "json-parser",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "json-parser-cli"
}