fast-json


Namefast-json JSON
Version 0.3.2 PyPI version JSON
download
home_page
SummaryCombines best parts of json and ujson for fast serialization
upload_time2018-12-12 16:43:54
maintainerDmitry Orlov
docs_urlNone
authorDmitry Orlov
requires_python
licenseApache 2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            fast-json
=========

Combines best parts of json and ujson for fast serialization.

.. code-block:: python

    import fast_json

    print(
        fast_json.dumps({
            "foo": "bar",
             "now": datetime.datetime.now()
        })
    )

Serializing custom type
~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: python

    import fast_json
    from collections import namedtuple


    MyType = namedtuple("MyType", ["name", "value"])


    @fast_json.convert.register(MyType)
    def _(value):
        return "name={0.name} value={0.value}".format(value)


    print(
        fast_json.dumps({
            "one": MyType(name="foo", value="bar")
        })
    )
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "fast-json",
    "maintainer": "Dmitry Orlov",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "me@mosquito.su",
    "keywords": "",
    "author": "Dmitry Orlov",
    "author_email": "me@mosquito.su",
    "download_url": "https://files.pythonhosted.org/packages/0f/1e/eafcfca27a76a767457623b095ca508f3e5a035c9a2649ad57f3f1dafa04/fast-json-0.3.2.tar.gz",
    "platform": "all",
    "description": "fast-json\n=========\n\nCombines best parts of json and ujson for fast serialization.\n\n.. code-block:: python\n\n    import fast_json\n\n    print(\n        fast_json.dumps({\n            \"foo\": \"bar\",\n             \"now\": datetime.datetime.now()\n        })\n    )\n\nSerializing custom type\n~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block:: python\n\n    import fast_json\n    from collections import namedtuple\n\n\n    MyType = namedtuple(\"MyType\", [\"name\", \"value\"])\n\n\n    @fast_json.convert.register(MyType)\n    def _(value):\n        return \"name={0.name} value={0.value}\".format(value)\n\n\n    print(\n        fast_json.dumps({\n            \"one\": MyType(name=\"foo\", value=\"bar\")\n        })\n    )",
    "bugtrack_url": null,
    "license": "Apache 2",
    "summary": "Combines best parts of json and ujson for fast serialization",
    "version": "0.3.2",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f1eeafcfca27a76a767457623b095ca508f3e5a035c9a2649ad57f3f1dafa04",
                "md5": "b6e8ace6e1e64d8a21273505b0e015f4",
                "sha256": "a1e706410cdc1b7bcab14383cdab9e093d7ca872ff761927c162bd7fda83ad2f"
            },
            "downloads": -1,
            "filename": "fast-json-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b6e8ace6e1e64d8a21273505b0e015f4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1902,
            "upload_time": "2018-12-12T16:43:54",
            "upload_time_iso_8601": "2018-12-12T16:43:54.399901Z",
            "url": "https://files.pythonhosted.org/packages/0f/1e/eafcfca27a76a767457623b095ca508f3e5a035c9a2649ad57f3f1dafa04/fast-json-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2018-12-12 16:43:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "fast-json"
}
        
Elapsed time: 0.13202s