gentleParserPy


NamegentleParserPy JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryThis is my first module
upload_time2024-10-29 13:02:20
maintainerNone
docs_urlNone
authorlopaet
requires_python>=3.7
licenseNone
keywords example python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Simple JSON Parser

A simple JSON parser implemented in Python without using any external libraries. This parser can handle a limited subset of JSON, including strings, numbers, objects, arrays, booleans, and null values.

## Features

- Parses JSON strings into Python data structures (dictionaries and lists).
- Supports basic JSON data types: strings, numbers, objects, arrays, booleans, and null.
- No external dependencies; written entirely in Python.

## Installation

You can simply copy the `JSONParser` class into your Python project. There is no need for installation via pip or any other package manager.

## Usage

To use the JSON parser, create an instance of the `JSONParser` class with a JSON string and call the `parse()` method. Here's an example:

```python
from json_parser import JSONParser  # Adjust the import based on your file structure

json_text = '{"name": "John", "age": 30, "is_student": false, "courses": ["Math", "Science"], "address": null}'
parser = JSONParser(json_text)
parsed_data = parser.parse()

print(parsed_data)
```

## Error Handling
The parser raises ValueError for various issues, such as:

Unexpected end of input
Invalid JSON values
Unterminated strings
Missing colons or commas in objects and arrays

## Limitations
This parser is a basic implementation and may not handle all edge cases or complex JSON structures.
It does not support JSON features like comments or special escape sequences in strings.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gentleParserPy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "example python",
    "author": "lopaet",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/8a/8b/59174dd7fbaa158c8cdd136c2a385820c9e11f1c460719757278536c5b36/gentleparserpy-1.0.0.tar.gz",
    "platform": null,
    "description": "# Simple JSON Parser\r\n\r\nA simple JSON parser implemented in Python without using any external libraries. This parser can handle a limited subset of JSON, including strings, numbers, objects, arrays, booleans, and null values.\r\n\r\n## Features\r\n\r\n- Parses JSON strings into Python data structures (dictionaries and lists).\r\n- Supports basic JSON data types: strings, numbers, objects, arrays, booleans, and null.\r\n- No external dependencies; written entirely in Python.\r\n\r\n## Installation\r\n\r\nYou can simply copy the `JSONParser` class into your Python project. There is no need for installation via pip or any other package manager.\r\n\r\n## Usage\r\n\r\nTo use the JSON parser, create an instance of the `JSONParser` class with a JSON string and call the `parse()` method. Here's an example:\r\n\r\n```python\r\nfrom json_parser import JSONParser  # Adjust the import based on your file structure\r\n\r\njson_text = '{\"name\": \"John\", \"age\": 30, \"is_student\": false, \"courses\": [\"Math\", \"Science\"], \"address\": null}'\r\nparser = JSONParser(json_text)\r\nparsed_data = parser.parse()\r\n\r\nprint(parsed_data)\r\n```\r\n\r\n## Error Handling\r\nThe parser raises ValueError for various issues, such as:\r\n\r\nUnexpected end of input\r\nInvalid JSON values\r\nUnterminated strings\r\nMissing colons or commas in objects and arrays\r\n\r\n## Limitations\r\nThis parser is a basic implementation and may not handle all edge cases or complex JSON structures.\r\nIt does not support JSON features like comments or special escape sequences in strings.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "This is my first module",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [
        "example",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df8d1ae19824b2492b5b6c84ab3d2b60feebc59b9db3bbaa8aa1faedf77d429c",
                "md5": "7595977177630092c7da6fd8e12e23bd",
                "sha256": "08a6865e8fb34cdd7180270402e9a400372a51d006856ee0ee7769448d909827"
            },
            "downloads": -1,
            "filename": "gentleParserPy-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7595977177630092c7da6fd8e12e23bd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 2777,
            "upload_time": "2024-10-29T13:02:18",
            "upload_time_iso_8601": "2024-10-29T13:02:18.572815Z",
            "url": "https://files.pythonhosted.org/packages/df/8d/1ae19824b2492b5b6c84ab3d2b60feebc59b9db3bbaa8aa1faedf77d429c/gentleParserPy-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a8b59174dd7fbaa158c8cdd136c2a385820c9e11f1c460719757278536c5b36",
                "md5": "65515aa646496e5551e8a1d7297b668b",
                "sha256": "e9966f60f516463761a6d3d28820703065e4457ef05aaf77df4e0b99d070555f"
            },
            "downloads": -1,
            "filename": "gentleparserpy-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "65515aa646496e5551e8a1d7297b668b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 2626,
            "upload_time": "2024-10-29T13:02:20",
            "upload_time_iso_8601": "2024-10-29T13:02:20.461682Z",
            "url": "https://files.pythonhosted.org/packages/8a/8b/59174dd7fbaa158c8cdd136c2a385820c9e11f1c460719757278536c5b36/gentleparserpy-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-29 13:02:20",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gentleparserpy"
}
        
Elapsed time: 0.37562s