{"id":20245422,"url":"https://github.com/letsmakecakes/json-parser","last_synced_at":"2026-05-12T14:03:04.154Z","repository":{"id":266058096,"uuid":"869264032","full_name":"letsmakecakes/json-parser","owner":"letsmakecakes","description":"A lightweight JSON parser built in Go, designed to tokenize and parse JSON.","archived":false,"fork":false,"pushed_at":"2024-12-30T08:00:30.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T06:48:38.667Z","etag":null,"topics":["cli","go","golang","json","lexer","lexer-parser","parser","tokenization"],"latest_commit_sha":null,"homepage":"","language":"Go","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/letsmakecakes.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":"2024-10-08T02:17:57.000Z","updated_at":"2024-12-30T08:00:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5e99f12-6221-4791-9d1f-3c39c47bc69f","html_url":"https://github.com/letsmakecakes/json-parser","commit_stats":null,"previous_names":["letsmakecakes/jsonparser","letsmakecakes/json-parser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fjson-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fjson-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fjson-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsmakecakes%2Fjson-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letsmakecakes","download_url":"https://codeload.github.com/letsmakecakes/json-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241622594,"owners_count":19992502,"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":["cli","go","golang","json","lexer","lexer-parser","parser","tokenization"],"created_at":"2024-11-14T09:20:54.572Z","updated_at":"2026-05-12T14:02:59.122Z","avatar_url":"https://github.com/letsmakecakes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go JSON Parser\n\nA high-performance JSON parser implementation in Go, built from scratch.\nThis project follows a step-by-step approach\nto building a fully-featured JSON parser with comprehensive test coverage and validation capabilities.\n\n## Features\n\n- 🚀 High-performance lexical and syntactic analysis\n- 🔍 Detailed error reporting with line and column information\n- ✅ Full JSON specification support\n- 📊 Optional performance benchmarking\n- 🔒 Strict mode validation\n- 💻 Command-line interface\n- 📝 Comprehensive test suite\n\n## Requirements\n\n- Go 1.19 or higher\n- Make (optional, for using the Makefile)\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/letsmakecakes/json-parser.git\ncd json-parser\n```\n\n2. Build the project:\n```bash\nmake build\n```\n\nOr using Go directly:\n```bash\ngo build -o build/jsonparser ./cmd/parser\n```\n\n## Usage\n\n### Basic Usage\n\nParse a JSON file:\n```bash\n./build/jsonparser input.json\n```\n\nParse from standard input:\n```bash\necho '{\"key\": \"value\"}' | ./build/jsonparser -\n```\n\n### Command Line Options\n\n```bash\nUsage: jsonparser [options] [file]\n\nOptions:\n  -file string\n        JSON file to parse (use '-' for stdin)\n  -verbose\n        Enable verbose output\n  -benchmark\n        Show parsing time\n  -strict\n        Enable strict mode validation\n```\n\n### Examples\n\n1. Parse with verbose output:\n```bash\n./build/jsonparser -verbose input.json\n```\n\n2. Parse with benchmarking:\n```bash\n./build/jsonparser -benchmark input.json\n```\n\n3. Parse in strict mode:\n```bash\n./build/jsonparser -strict input.json\n```\n\n## Project Structure\n\n```\n.\n├── cmd\n│   └── parser\n│       └── main.go       # Main entry point\n├── internal\n│   ├── lexer            # Lexical analysis\n│   │   ├── lexer.go\n│   │   ├── token.go\n│   │   └── lexer_test.go\n│   ├── parser           # Syntactic analysis\n│   │   ├── parser.go\n│   │   ├── ast.go\n│   │   └── parser_test.go\n│   └── validator        # JSON validation\n│       ├── validator.go\n│       └── validator_test.go\n├── pkg\n│   └── errors           # Error definitions\n│       └── errors.go\n├── test                 # Test files\n│   ├── step1\n│   ├── step2\n│   ├── step3\n│   ├── step4\n│   └── step5\n├── go.mod\n├── go.sum\n├── Makefile\n└── README.md\n```\n\n## Development\n\n### Running Tests\n\nRun all tests:\n```bash\nmake test\n```\n\nRun specific test steps:\n```bash\nmake test-step1\nmake test-step2\nmake test-step3\nmake test-step4\n```\n\n### Development Commands\n\nFormat code:\n```bash\nmake fmt\n```\n\nRun linter:\n```bash\nmake lint\n```\n\nClean build artifacts:\n```bash\nmake clean\n```\n\n## Error Handling\n\nThe parser provides detailed error messages with line and column information:\n\n```\nError: \n{\"key\": \"value\",}\n                ^\nunexpected comma at line 1, column 16\n```\n\n## Implementation Steps\n\n1. **Step 1**: Basic JSON object parsing (`{}`)\n2. **Step 2**: String key-value pairs\n3. **Step 3**: Multiple data types (strings, numbers, booleans, null)\n4. **Step 4**: Nested objects and arrays\n5. **Step 5**: Comprehensive validation and error handling\n\n## Performance\n\nThe parser includes optional benchmarking capabilities. When run with the `-benchmark` flag, it provides:\n- Total parsing time\n- Processing speed (MB/s)\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License—see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Inspired by the [JSON specification](https://tools.ietf.org/html/std90)\n- Built the following best practices from the \"Dragon Book\" (Compilers: Principles, Techniques, and Tools)\n\n## Author\n\nAdwaith Rajeev ([@letsmakecakes](https://github.com/letsmakecakes))\n\n## Support\n\nIf you have any questions or run into issues, please open an issue in the GitHub repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsmakecakes%2Fjson-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletsmakecakes%2Fjson-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsmakecakes%2Fjson-parser/lists"}