ebj2


Nameebj2 JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://gitlab.com/urain39/ebj2
SummaryEmbedded Binary JSON
upload_time2022-12-01 21:43:08
maintainer
docs_urlNone
authorurain39
requires_python
licenseMIT
keywords json binary-json embedded
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Embedded Binary JSON

### What is EBJ?

EBJ is a format that focuses on storing binary json use RIGHT size.

### Byte Order

EBJ always use little-endian. It is more friendly for morden CPU to parse.

### Type Codes

```txt
0x00 int8
0x01 int16
0x02 int32
0x03 int64
0x04 float32
0x05 float64
0x06 str8 (uint8 length)
0x07 str32 (uint32 length)
0x08 ref8 (str only)
0x09 ref32 (str only)
0x0A true
0x0B false
0x0C null
0x0D array
0x0E end (array, object)
0x0F object
0x10 0
0x11 1
0x12 2
...
0xFF 239
```

> EBJ strXX should be encoded as UTF-8 bytes.

### How to use EBJ?

This repo contains a base Python version EBJ implementation called `ebj2`. The
following lines show how to use `ebj2` to dump and load EBJ bytes.

Install:
```sh
pip install ebj2
```

Usage:
```py
# Load module
import ebj2

# Dump EBJ
byts = ebj2.dumps(['ebj2 is awesome!'])

# Load EBJ
msgs = ebj2.loads(byts)

# Dump to fp
ebj2.dump([], fp)

# Load from fp
ebj2.load(fp)
```

### Why should i use EBJ?

At least EBJ will save your 33% disk space to store json. Also it is very fast.
(`ebj2` maybe very slow, because it use pure-python, but still usable)

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/urain39/ebj2",
    "name": "ebj2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "json,binary-json,embedded",
    "author": "urain39",
    "author_email": "urain39@qq.com",
    "download_url": "",
    "platform": "all",
    "description": "# Embedded Binary JSON\n\n### What is EBJ?\n\nEBJ is a format that focuses on storing binary json use RIGHT size.\n\n### Byte Order\n\nEBJ always use little-endian. It is more friendly for morden CPU to parse.\n\n### Type Codes\n\n```txt\n0x00 int8\n0x01 int16\n0x02 int32\n0x03 int64\n0x04 float32\n0x05 float64\n0x06 str8 (uint8 length)\n0x07 str32 (uint32 length)\n0x08 ref8 (str only)\n0x09 ref32 (str only)\n0x0A true\n0x0B false\n0x0C null\n0x0D array\n0x0E end (array, object)\n0x0F object\n0x10 0\n0x11 1\n0x12 2\n...\n0xFF 239\n```\n\n> EBJ strXX should be encoded as UTF-8 bytes.\n\n### How to use EBJ?\n\nThis repo contains a base Python version EBJ implementation called `ebj2`. The\nfollowing lines show how to use `ebj2` to dump and load EBJ bytes.\n\nInstall:\n```sh\npip install ebj2\n```\n\nUsage:\n```py\n# Load module\nimport ebj2\n\n# Dump EBJ\nbyts = ebj2.dumps(['ebj2 is awesome!'])\n\n# Load EBJ\nmsgs = ebj2.loads(byts)\n\n# Dump to fp\nebj2.dump([], fp)\n\n# Load from fp\nebj2.load(fp)\n```\n\n### Why should i use EBJ?\n\nAt least EBJ will save your 33% disk space to store json. Also it is very fast.\n(`ebj2` maybe very slow, because it use pure-python, but still usable)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Embedded Binary JSON",
    "version": "0.0.1",
    "split_keywords": [
        "json",
        "binary-json",
        "embedded"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "01382e2e1c3306ef75515015deeda240",
                "sha256": "baba4809fd80fe2a94e043fced486137216b1160aeeecd8cceb7d9a1c50cce96"
            },
            "downloads": -1,
            "filename": "ebj2-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "01382e2e1c3306ef75515015deeda240",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3285,
            "upload_time": "2022-12-01T21:43:08",
            "upload_time_iso_8601": "2022-12-01T21:43:08.471545Z",
            "url": "https://files.pythonhosted.org/packages/86/68/61129a9f6ef1b912c1654a1ed0ac7307c9ba7b1fae0141e1290390f2b15a/ebj2-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-01 21:43:08",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "gitlab_user": "urain39",
    "gitlab_project": "ebj2",
    "lcname": "ebj2"
}
        
Elapsed time: 0.01860s