{"id":48801729,"url":"https://github.com/visualdoj/jxon","last_synced_at":"2026-04-14T03:04:05.598Z","repository":{"id":63299560,"uuid":"565802304","full_name":"visualdoj/jxon","owner":"visualdoj","description":"JXON is a binary format for structured data. Interchangeable with JSON.","archived":false,"fork":false,"pushed_at":"2022-11-21T17:54:46.000Z","size":165,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-06T16:48:23.284Z","etag":null,"topics":["binary-format","binary-formats","binary-json","binary-structure","json","json-binary","jxon","parsing","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/visualdoj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-14T11:04:40.000Z","updated_at":"2022-12-25T07:58:52.000Z","dependencies_parsed_at":"2023-01-22T12:46:04.593Z","dependency_job_id":null,"html_url":"https://github.com/visualdoj/jxon","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/visualdoj/jxon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualdoj%2Fjxon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualdoj%2Fjxon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualdoj%2Fjxon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualdoj%2Fjxon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/visualdoj","download_url":"https://codeload.github.com/visualdoj/jxon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualdoj%2Fjxon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31779962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-format","binary-formats","binary-json","binary-structure","json","json-binary","jxon","parsing","python"],"created_at":"2026-04-14T03:04:01.835Z","updated_at":"2026-04-14T03:04:05.585Z","avatar_url":"https://github.com/visualdoj.png","language":"Python","readme":"[![JXON CI](https://github.com/visualdoj/jxon/actions/workflows/jxon-ci.yml/badge.svg)](https://github.com/visualdoj/jxon/actions/workflows/jxon-ci.yml)\n\n# JXON\n\n`JXON` is a binary format for structured data.\n\n* Simple to understand and use\n* Uses modern binary types \"as is\": little-endian integers, IEEE-754 floats and UTF-8 strings\n* Allows storing repeated keys in a special table for reducing memory consumption\n* `JXON` and `JSON` are not mutually exclusive, interchangeability is a design goal\n\n## Status\n\nDraft. Format for `BigInt` is yet to be [chosen](docs/bigint_ideas.md).\n\n## Examples\n\nSee [examples](examples#jxon-examples) directory. `*.jxon` files are JXON values,\n`*.txt` are their hex dumps and `*.json` are their respective JSON equivalents.\n\n## Implementations\n\n* [Python](python) — reference implementation (still in development)\n\n## Specification\n\n`JXON` value is a sequence of commands. Each command starts with 1 byte header\ncalled *head*, which may be followed by arguments of the command.\n\n![JXON bytes diagram](docs/jxon.svg)\n\nCommands:\n\n```\nHead      Arguments                    Meaning\n(Hex)\n--------- ---------------------------- ----------------------------------------\n\n0x00-0x7F                              ERROR: forbidden ASCII characters\n\n0x8?      [integer]                    integer (see below)\n0x9?      [size] byte*                 BLOB (arbitrary binary data, also known as byte string)\n0xA?      [size] utf8char* 0           UTF-8 string\n0xB?      [size] utf8char* 0 index     put UTF-8 string to table[index], 0\u003c=index\u003c128\n\n0xC0-0xEF                              ERROR: reserved\n\n0xF0                                   null\n0xF1                                   false\n0xF2                                   true\n0xF3                                   start object\n0xF4                                   start array\n0xF5                                   end object or array\n0xF6                                   0.0 (floating-point zero)\n0xF7      float                        32-bit IEEE float\n0xF8      double                       64-bit IEEE float\n0xF9      BigInt BigInt                large float (mantissa and binary exponent)\n\n0xFA-0xFD                              ERROR: reserved\n0xFE-0xFF                              ERROR: forbidden UTF-8/16/32 BOMs\n```\n\nIntegers (`0x8?`) and sizes (in `0x9?`, `0xA?` and `0xB?` commands) may be in\none of the following forms:\n\n```\nHead        i       Arguments           Value\nBinary\n----------- ------- ------------------- ---------------------------------------\n\nb10xx0000   0                           0\nb10xx0001   1                           1\nb10xx0010   2                           2\nb10xx0011   3                           3\nb10xx0100   4                           4\nb10xx0101   5                           5\nb10xx0110   6                           6\nb10xx0111   7                           7\nb10xx1000   8                           8\nb10xx1001   9                           9\nb10xx1010   10      Int8                Little-endian  8-bits signed integer\nb10xx1011   11      Int16               Little-endian 16-bits signed integer\nb10xx1100   12      Int32               Little-endian 32-bits signed integer\nb10xx1101   13      Int64               Little-endian 64-bits signed integer\nb10xx1110   14      BigInt              Signed BigInt\nb10xx1111   15                          -1\n```\n\n### BigInt\n\n[TBA](docs/bigint_ideas.md)\n\n### The table\n\nParser should keep up to 128 string values in a special array of strings called\n*table* while parsing. Each value in the table has an index in range 0..127. At\nthe beginning of parsing the table should be filled with empty strings.\n\nTo store a string to the table command `Bi` is used. Format of the command is\nsimilar to string value, the only difference is 1-byte index value at the end:\n\n```\nBinary   Hex    Arguments                       Meaning\n1011iiii Bi     \u003csize\u003e utf8char* 0 index        put the string to table[index]\n                                                (0 \u003c= index \u003c 128)\n```\n\nValues in the table may be overwritten by following \"put\" commands.\n\nThe table is used only for keys. It cannot be used for values.\n\n### Structures: arrays and objects\n\nAn array starts with `F4` and ends with `F5`. Between the two must be a\nsequence of JXON values.\n\nAn object starts with `F3` and ends with `F5`. Between the two bytes must\nbe a sequence of key-value pairs.\n\nKeys are always strings. They may be specified with an index to the table:\n\n```\nBinary   Hex    Arguments                       Meaning\n0iiiiiii                                        Use table[index] as the key, where index is the head byte\n1010iiii Ai     \u003csize\u003e utf8char* 0              Use the specified UTF-8 string as key\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisualdoj%2Fjxon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvisualdoj%2Fjxon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisualdoj%2Fjxon/lists"}