{
"info": {
"author": "Colin Nolan",
"author_email": "colin.nolan@sanger.ac.uk",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3"
],
"description": "|Build Status| |codecov.io| |Documentation Status|\n\nHGI JSON\n========\n\nA Python 3 library for easily JSON encoding/decoding complex class-based\nPython models, using an arbitrarily complex (but easy to write!) mapping\nschema.\n\nFeatures\n--------\n\n- Ability to create serializers and deserializers for complex\n class-based models using a mapping schema defined in Python.\n- Works seamlessly with Python's in-built ``json.dumps`` and\n ``json.loads`` serialization methods - does not require the use of\n exotic ``convert_to_json``/``convert_from_json`` methods.\n- Python models are not be coupled to the serialization process -\n models do not have to inherit from a particular superclass or\n implement an interface with a ``to_json`` (or similar) method.\n- JSON representations produced are not coupled to the Python model -\n an arbitrary mapping between the JSON and the model can be defined.\n- Simple to define serialization of subclasses, based on how\n superclasses are serialized.\n- Pure Python 3 - no DSL, XML or similar required to describe mappings,\n not using outdated Python 2.\n- `Well tested `__.\n\nOverview\n--------\n\nBasic Steps\n~~~~~~~~~~~\n\n1. Define schema for mapping an object to and/or from JSON\n representation using a list of ``JsonPropertyMapping`` definitions.\n2. Use ``MappingJSONEncoderClassBuilder`` with the mappings to build a\n subclass of ``JSONEncode`` for serializing instances of a specific\n type. Similar with decode.\n3. Use created encoder class with Python's in-built ``json.dumps`` via\n the ``cls`` parameter. Similar with decoder.\n\nDefining Encoders/Decoders\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nEncoders and decoders are generated based on a defined JSON <-> Model\nmapping. A mapping can be written that allows complex classes, such as\nthat below, to be mapped to and from any JSON representation:\n\n.. code:: python\n\n class CustomClass(SupportFor, MultipleInheritance):\n self __init__(self, support_for_constructor_parameters):\n self.support_for_all_types_of_properties = \"\"\n self.including_sets = set()\n self.and_lists = list()\n self.and_dictionaries = dict()\n self.and_complex_properties = ComplexClass()\n self.and_nested_objects_of_the_same_type = CustomClass()\n self.and_properties_not_in_json_if_none = None\n\n self support_for_setters(self, value):\n \"\"\"...\"\"\"\n\n self support_for_getters(self):\n \"\"\"...\"\"\"\n \n CustomClassJSONEncoder = MappingJSONEncoderClassBuilder(...).build() # type: JSONEncoder\n CustomClassJSONDecoder = MappingJSONDecoderClassBuilder(...).build() # type: JSONDecoder\n\n custom_class_as_json = json.dumps(custom_class, cls=CustomClassJSONEncoder) # type: str\n custom_class = json.loads(\"\", cls=CustomClassJSONDecoder) # type: CustomClass\n\nDocumentation\n-------------\n\nFor more details, including information on how to setup and use the\nlibrary, please `view the documentation on\nReadTheDocs `__ or read it\nfrom ``/docs``.\n\n.. |Build Status| image:: https://travis-ci.org/wtsi-hgi/python-json.svg\n :target: https://travis-ci.org/wtsi-hgi/python-json\n.. |codecov.io| image:: https://codecov.io/gh/wtsi-hgi/python-json/graph/badge.svg\n :target: https://codecov.io/gh/wtsi-hgi/python-json/\n.. |Documentation Status| image:: https://readthedocs.org/projects/hgi-json/badge/?version=latest\n :target: http://hgi-json.readthedocs.io/en/latest/?badge=latest\n",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/wtsi-hgi/python-json",
"keywords": "json",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "hgijson",
"package_url": "https://pypi.org/project/hgijson/",
"platform": "",
"project_url": "https://pypi.org/project/hgijson/",
"project_urls": {
"Homepage": "https://github.com/wtsi-hgi/python-json"
},
"release_url": "https://pypi.org/project/hgijson/3.1.0/",
"requires_dist": null,
"requires_python": "",
"summary": "Python 3 library for easily JSON encoding/decoding complex class-based Python models, using an arbitrarily complex (but easy to write!) mapping schema.",
"version": "3.1.0"
},
"last_serial": 3513825,
"releases": {
"1.2.2": [
{
"comment_text": "",
"digests": {
"md5": "e62e75e20f2d60a4fc0677de8224e3ab",
"sha256": "ae92764d80a1aaee300b99839bd34d20b42e81d98169fbf3cc4dcdd18e0a0162"
},
"downloads": -1,
"filename": "hgijson-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "e62e75e20f2d60a4fc0677de8224e3ab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29613,
"upload_time": "2016-05-18T15:17:03",
"url": "https://files.pythonhosted.org/packages/01/7e/50c06211abcbe4477bd0a908f218f5ff51fe0261d6abc7964d0fa43f58ca/hgijson-1.2.2.tar.gz"
}
],
"1.3.0": [
{
"comment_text": "",
"digests": {
"md5": "df980b85d20403df9857f6526e731587",
"sha256": "09d0a2e4aeac1bf3d358aaa7dc2850a9660222883500c28c7520c450668db8a6"
},
"downloads": -1,
"filename": "hgijson-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "df980b85d20403df9857f6526e731587",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 32367,
"upload_time": "2016-05-19T12:49:43",
"url": "https://files.pythonhosted.org/packages/77/ae/c9be10b588a18f06cf02a2698004a4e037ae03a001015186b4becc3d8e3a/hgijson-1.3.0.tar.gz"
}
],
"1.3.1": [
{
"comment_text": "",
"digests": {
"md5": "e97360ad5f63fbed183df1425c9171e2",
"sha256": "bad7bcb68b07b2093f55528c1fd24046e06bf7e79ec3137b2e3c30da862bbd71"
},
"downloads": -1,
"filename": "hgijson-1.3.1.tar.gz",
"has_sig": false,
"md5_digest": "e97360ad5f63fbed183df1425c9171e2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 32366,
"upload_time": "2016-05-19T13:04:13",
"url": "https://files.pythonhosted.org/packages/5c/c8/9209d98dfc7256d0125049c514753b1d91e7a854e660cc8b041e9fb26389/hgijson-1.3.1.tar.gz"
}
],
"1.4.0": [
{
"comment_text": "",
"digests": {
"md5": "fd2e407450ae5093fdbd0810fabf8883",
"sha256": "20ec06ec9d091b311946d514176a75d2aa834943d4448a0d4709254ebe8b2ece"
},
"downloads": -1,
"filename": "hgijson-1.4.0.tar.gz",
"has_sig": false,
"md5_digest": "fd2e407450ae5093fdbd0810fabf8883",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 32482,
"upload_time": "2016-08-04T11:09:03",
"url": "https://files.pythonhosted.org/packages/6b/5c/6cacbe8dcf33d0183a15ac539a0f3e22df3219b618f6f0cb9ff92b319272/hgijson-1.4.0.tar.gz"
}
],
"1.4.1": [
{
"comment_text": "",
"digests": {
"md5": "418c5b8a8cd75891ed6e2eb2132fbf9b",
"sha256": "b573d63fc52e4071864aae4ce267d7929b32865e7ec3047c6d726aebea14d65c"
},
"downloads": -1,
"filename": "hgijson-1.4.1.tar.gz",
"has_sig": false,
"md5_digest": "418c5b8a8cd75891ed6e2eb2132fbf9b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 32690,
"upload_time": "2016-08-04T13:34:08",
"url": "https://files.pythonhosted.org/packages/61/b7/3daba63af391a3f19372bb72c57d35d244e38b7da85b25102afc388279aa/hgijson-1.4.1.tar.gz"
}
],
"1.4.2": [
{
"comment_text": "",
"digests": {
"md5": "4d9ddb23dba3cb2358aad6b9a7f2efb8",
"sha256": "03fe46bde308d59d6d48eb11611542d19e8228106f2424fe5424bf0731ef63ac"
},
"downloads": -1,
"filename": "hgijson-1.4.2.tar.gz",
"has_sig": false,
"md5_digest": "4d9ddb23dba3cb2358aad6b9a7f2efb8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 32941,
"upload_time": "2016-08-04T19:37:29",
"url": "https://files.pythonhosted.org/packages/aa/e4/7d3109aebe1de1e2893ee8827f72dac18d15d3dd4c459d0979787f3afc21/hgijson-1.4.2.tar.gz"
}
],
"1.4.3": [
{
"comment_text": "",
"digests": {
"md5": "f70ba443fab04cfae9d87e938cbdcb71",
"sha256": "194bd87b0b11fd86e6e5fad1ee5656fbf798da00a8802165cf733614f9321c09"
},
"downloads": -1,
"filename": "hgijson-1.4.3.tar.gz",
"has_sig": false,
"md5_digest": "f70ba443fab04cfae9d87e938cbdcb71",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20590,
"upload_time": "2016-08-30T09:23:53",
"url": "https://files.pythonhosted.org/packages/94/b0/4bfa923260c9822371888bd0b59c5d0384875c3e3f3a8eca840f0bbcebb9/hgijson-1.4.3.tar.gz"
}
],
"1.5.0": [
{
"comment_text": "",
"digests": {
"md5": "6de7f2642e7634a07fd03d40884bfcab",
"sha256": "8fb600ac0f5b1940315f0ff929894df5b4216fa9e409acfca2c23da4ac870aeb"
},
"downloads": -1,
"filename": "hgijson-1.5.0.tar.gz",
"has_sig": false,
"md5_digest": "6de7f2642e7634a07fd03d40884bfcab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20432,
"upload_time": "2017-11-16T16:23:51",
"url": "https://files.pythonhosted.org/packages/74/1b/2807088847ddc86a830cb88953849559b323b99881288db5bf1f156fc697/hgijson-1.5.0.tar.gz"
}
],
"2.0.0": [
{
"comment_text": "",
"digests": {
"md5": "792b6c609baf7f341b238cd858b2d1e3",
"sha256": "ea204c4c7a68377a82c74d9935c76463b18898677df8b10022865b6c25df6771"
},
"downloads": -1,
"filename": "hgijson-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "792b6c609baf7f341b238cd858b2d1e3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21052,
"upload_time": "2018-01-08T15:14:35",
"url": "https://files.pythonhosted.org/packages/fb/e9/940d0a1d4e1614efbb78bb72da0e21ae35acbef1d59753ac6ddfccd2ce68/hgijson-2.0.0.tar.gz"
}
],
"3.0.0": [
{
"comment_text": "",
"digests": {
"md5": "3530115e5b48c4872ff00429b36c7dd6",
"sha256": "430786970acdf4a3572f117d33effdc741657ef6134e996e609b2eaad660aa8b"
},
"downloads": -1,
"filename": "hgijson-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "3530115e5b48c4872ff00429b36c7dd6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21127,
"upload_time": "2018-01-16T13:01:21",
"url": "https://files.pythonhosted.org/packages/e8/36/1b3b3e8909d931deff48dd2f0aa2969702fdf77c68c4d5a16687d621b6e1/hgijson-3.0.0.tar.gz"
}
],
"3.0.1": [
{
"comment_text": "",
"digests": {
"md5": "471fc14cafa6e61de76790735c503fd0",
"sha256": "6b914a5eb6275966ebd11c5cb2857e1b67d232ae3e5c459d86f63ac2bd851e2a"
},
"downloads": -1,
"filename": "hgijson-3.0.1.tar.gz",
"has_sig": false,
"md5_digest": "471fc14cafa6e61de76790735c503fd0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21140,
"upload_time": "2018-01-17T11:05:56",
"url": "https://files.pythonhosted.org/packages/6f/9e/09129d9ac9e344aeaa3c99b9a9ac114e6e3a511070307f91a935e924db7f/hgijson-3.0.1.tar.gz"
}
],
"3.1.0": [
{
"comment_text": "",
"digests": {
"md5": "fc11cd82b19a7c9bb2b5d6a8c401a220",
"sha256": "1ac523eb5d2dc55d28000a4a493f279a45e39ba5c70fc91a738f2c7d8f220d76"
},
"downloads": -1,
"filename": "hgijson-3.1.0.tar.gz",
"has_sig": false,
"md5_digest": "fc11cd82b19a7c9bb2b5d6a8c401a220",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22010,
"upload_time": "2018-01-23T12:34:23",
"url": "https://files.pythonhosted.org/packages/2a/70/6ad4309aedf83a258fa1b7d705bc8c824d47835f088e56f798a783b7c44d/hgijson-3.1.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "fc11cd82b19a7c9bb2b5d6a8c401a220",
"sha256": "1ac523eb5d2dc55d28000a4a493f279a45e39ba5c70fc91a738f2c7d8f220d76"
},
"downloads": -1,
"filename": "hgijson-3.1.0.tar.gz",
"has_sig": false,
"md5_digest": "fc11cd82b19a7c9bb2b5d6a8c401a220",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22010,
"upload_time": "2018-01-23T12:34:23",
"url": "https://files.pythonhosted.org/packages/2a/70/6ad4309aedf83a258fa1b7d705bc8c824d47835f088e56f798a783b7c44d/hgijson-3.1.0.tar.gz"
}
]
}