Skip to main content

A JSON parser written in Python.

Project description

jsonmgnt

A simple JSON parsing tool.

Installation

Install it via pip:

pip install jsonmgnt

Usage

import jsonmgnt

dat2 = jsonmgnt.parse('{"Invoker": "SunStrike"}')
print(dat2['Invoker']) # SunStrike

dat1 = jsonmgnt.parse('{"Hammer Level": 25}')
print(dat1['Hammer Level']) # 25

The examples using the find_keys().

data = [
    {"key": 1},
    {"key": 2},
    {"my": 
        {"key": 
            {
                "chain": "A",
                "rope": 5,
                "string": 1.2,
                "cable": False
            }
        }
    },
    {"your":
    	{"key":
            {
                "chain": "B",
                "rope": 7,
                "string": 0.7,
                "cable": True
            }
    	}
    }
]
p.find_keys(data, ['rope', 'cable'])
[[5, False], [7, True]]

p.find_keys(data, ['rope', 'cable'], group=False)
[5, False, 7, True]

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

jsonmgnt-1.1.1.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

jsonmgnt-1.1.1-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

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