Skip to main content

A JSON parser and CLI tool (learning purpose)

Project description

json-parser

A cli tool for lexical and syntactical analysis. It parses json files.

PyPI package


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
  • No runtime dependencies required.

Installation

pip install json-parser-cli

How to use

use json-parser command to validate json files.

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,

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

json_parser_cli-0.1.1.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

json_parser_cli-0.1.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file json_parser_cli-0.1.1.tar.gz.

File metadata

  • Download URL: json_parser_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for json_parser_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b123bbf79d1a0c395877538811daba115befc2cb559592aab5fee7bd41b72473
MD5 44b11044325c0407c8201943d1d546e5
BLAKE2b-256 23c83290bcc92f7e858da1a5e2f9460329de7cf562a5e662665f11ff7acb1a8e

See more details on using hashes here.

File details

Details for the file json_parser_cli-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for json_parser_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1be47ef028f95127155d19c3577d46ffb2df9333d0db61f1c14d07b20e478601
MD5 2b41585234d4e53ac1f5e70055219f0b
BLAKE2b-256 5093efe7accfaea145bb37acfbd53f1eed6565332f6c9d9129e5a5e3553482a4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page