Skip to main content

simplejsonobject

made-with-python PyPI version PyPI - Downloads PyPI - Implementation pipeline status pylint status coverage report

A simple python object which can easily transform to and from json with compression support

Install

pip install simplejsonobject

Usage

from simplejsonobject import JsonObject


class Sample(JsonObject):
    def __init__(self):
        self.a = "8"
        self.b = 3
        self.c = None

        
def main():
	smp=Sample()
	smp.to_dict() # {"a": tdata, "b": 3, "c": None}
	smp.to_dict_compressed() # {"a": tdata, "b": 3}
	smp.to_json() # '{\n    "a": 8,\n    "b": 3,\n    "c": null\n}'
	smp.to_json_compressed() # '{"a": 8, "b": 3}'
	
	# or you can import from any compressed/notcompressed json/dict
	# all below results same object
	tsmp.from_dict({"a": tdata, "b": 3, "c": None}
	tsmp.from_dict({"a": tdata, "b": 3})
	tsmp.from_json('{\n    "a": "8",\n    "b": 3,\n    "c": null\n}')
	tsmp.from_json('{"a": "8", "b": 3}')


if __name__ == '__main__':
    main()

Release files for simplejsonobject 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplejsonobject 0.1.6
File Size Uploaded
simplejsonobject-0.1.6.tar.gz 3.8 kB Details

Release files / simplejsonobject-0.1.6.tar.gz

Download URL simplejsonobject-0.1.6.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b913c921caeef8f9bcfe27ebaaf3e0374e650cea40d8f4d770747f86a504b087
BLAKE2b-256 checksum
How to use checksums
c0ef1baecd427fc529ae333e5d4dd1fa1bcde999fe16faf54129e71c55578b10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page