{ "info": { "author": "Nicola Iarocci", "author_email": "nicola@nicolaiarocci.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "JSON-datetime\n=============\n.. image:: https://secure.travis-ci.org/nicolaiarocci/json-datetime.png?branch=master\n :target: https://secure.travis-ci.org/nicolaiarocci/json-datetime\n\nJSON-datetime allows for proper decoding of datetime values contained in JSON\nstreams.\n\nThe problem\n-----------\nThe JSON standard RFC 4627 does not\nsupport datetime types. These are usually represented as strings and Python \ndecoders end up decoding them as such. Consider the following example:\n\n.. code-block:: python\n\n import simplejson as json\n\n >>> test = '{\"name\": \"John Doe\", \"born\": \"Thu, 1 Mar 2012 10:00:49 UTC\"}'\n >>> json.loads(test)\n\nAs you can see, in the resulting dictionary ``born`` is still a string.\n\nThe solution\n------------\nJSON-datetime is a very simple wrapper around Python simplejson ``loads`` \nmethod. It decodes datetime values contained in JSON strings: \n\n.. code-block:: python\n\n import jsondatetime as json\n\n >>> test = '{\"name\": \"John Doe\", \"born\": \"Thu, 1 Mar 2012 10:00:49 UTC\"}'\n >>> json.loads(test)\n {'name': 'John Doe', 'born': datetime.datetime(2012, 3, 1, 10, 0 ,49)}\n\nStrings are parsed using ``dateutil.parser.parse`` which is fairly flexible for\ncommon datetime formats\n\nCustom parsing\n--------------\nBeing just a wrapper around the ``loads`` method, you can still use all the\nstandard ``loads`` arguments, ``object_hook`` included. This means that you can\nstill perform custom parsing of your inbound JSON stream.\n\nInstallation\n------------\n``pip install json-datetime``\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/nicolaiarocci/json-datetime", "keywords": "", "license": "Copyright (c) 2012 Nicola Iarocci.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n", "maintainer": "", "maintainer_email": "", "name": "JSON-Datetime", "package_url": "https://pypi.org/project/JSON-Datetime/", "platform": "any", "project_url": "https://pypi.org/project/JSON-Datetime/", "project_urls": { "Homepage": "http://github.com/nicolaiarocci/json-datetime" }, "release_url": "https://pypi.org/project/JSON-Datetime/0.0.5/", "requires_dist": null, "requires_python": "", "summary": "Allows for proper decoding of datetime values contained in JSON streams", "version": "0.0.5" }, "last_serial": 3337797, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "15b1c4499172ed5a8a02621ac603a7dd", "sha256": "8765de836edd98fa684a3dce85c46e6a069231738eeeba2aeaa0d1c5e6f333bf" }, "downloads": -1, "filename": "JSON-Datetime-0.0.1.tar.gz", "has_sig": false, "md5_digest": "15b1c4499172ed5a8a02621ac603a7dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3342, "upload_time": "2012-09-06T10:59:12", "url": "https://files.pythonhosted.org/packages/7e/68/24cdaa395697232c4607fc27aaf18f66ff2d0247aa6249627120774660a2/JSON-Datetime-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "8dab8058f8cf6fa1c4bfbf06411fa899", "sha256": "faf02f2c4cc98610fd88c56c56440932d5ded9345826b9bfb1a349132bc5b952" }, "downloads": -1, "filename": "JSON-Datetime-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8dab8058f8cf6fa1c4bfbf06411fa899", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3435, "upload_time": "2012-09-06T14:36:46", "url": "https://files.pythonhosted.org/packages/97/84/3625f1bcdfa78ff35aa69e3cec50caf785241dcf64fe183a7c155e420bfa/JSON-Datetime-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "9a6197bedaab99d03e4ac9dc800fb64f", "sha256": "65b044a6579694a1947c2662ce0cca6c24bd44903ac71fb62eb109cce7514e75" }, "downloads": -1, "filename": "JSON-Datetime-0.0.3.tar.gz", "has_sig": false, "md5_digest": "9a6197bedaab99d03e4ac9dc800fb64f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3460, "upload_time": "2014-10-13T13:24:39", "url": "https://files.pythonhosted.org/packages/d6/96/835a7468bc960dbfffaeaedea83d512912f308b39ccba59a635ab19b9fe3/JSON-Datetime-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "e3118525aa3b509aa0f5e54d4592f0d9", "sha256": "101f382982c71b7bc4d40699d9c16b8841769c343b1abf0378c0185061dcd763" }, "downloads": -1, "filename": "JSON-Datetime-0.0.4.tar.gz", "has_sig": false, "md5_digest": "e3118525aa3b509aa0f5e54d4592f0d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3490, "upload_time": "2017-11-03T08:15:18", "url": "https://files.pythonhosted.org/packages/b5/b8/58ca0a292bfad2d7cb6dd3f746c504fe2b8768dd20c2f833fce16cdde582/JSON-Datetime-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "a0d55b3159d5d3341f7d4feb625119d1", "sha256": "3ee17060d6cfd48affa9d32690e44122a5024637fca4fa66f339315bbed572fb" }, "downloads": -1, "filename": "JSON-Datetime-0.0.5.tar.gz", "has_sig": false, "md5_digest": "a0d55b3159d5d3341f7d4feb625119d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3560, "upload_time": "2017-11-16T08:13:44", "url": "https://files.pythonhosted.org/packages/4b/da/8fe7ad4c4eb88c3e26fe763cce69fb0d796759c6682531126d8bb3447d80/JSON-Datetime-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a0d55b3159d5d3341f7d4feb625119d1", "sha256": "3ee17060d6cfd48affa9d32690e44122a5024637fca4fa66f339315bbed572fb" }, "downloads": -1, "filename": "JSON-Datetime-0.0.5.tar.gz", "has_sig": false, "md5_digest": "a0d55b3159d5d3341f7d4feb625119d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3560, "upload_time": "2017-11-16T08:13:44", "url": "https://files.pythonhosted.org/packages/4b/da/8fe7ad4c4eb88c3e26fe763cce69fb0d796759c6682531126d8bb3447d80/JSON-Datetime-0.0.5.tar.gz" } ] }