{"id":22801314,"url":"https://github.com/stevebeeblebrox/jsion","last_synced_at":"2026-04-21T09:33:26.378Z","repository":{"id":118670602,"uuid":"416826647","full_name":"SteveBeeblebrox/JSION","owner":"SteveBeeblebrox","description":"JavaScript-ish Object Notation - A superset of JSON with comments, single quote strings, unquoted property names, trailing commas, and other quality of life features","archived":false,"fork":false,"pushed_at":"2024-12-31T02:48:12.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T10:04:04.918Z","etag":null,"topics":["json","json-comments","transpiler"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/SteveBeeblebrox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-13T16:52:45.000Z","updated_at":"2024-12-31T02:48:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"532deae5-1bd7-4ea0-beb6-f1b42c567685","html_url":"https://github.com/SteveBeeblebrox/JSION","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SteveBeeblebrox/JSION","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SteveBeeblebrox%2FJSION","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SteveBeeblebrox%2FJSION/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SteveBeeblebrox%2FJSION/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SteveBeeblebrox%2FJSION/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SteveBeeblebrox","download_url":"https://codeload.github.com/SteveBeeblebrox/JSION/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SteveBeeblebrox%2FJSION/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32085541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["json","json-comments","transpiler"],"created_at":"2024-12-12T08:09:56.788Z","updated_at":"2026-04-21T09:33:26.351Z","avatar_url":"https://github.com/SteveBeeblebrox.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSION ![GitHub](https://img.shields.io/github/license/SteveBeeblebrox/JSION?style=flat-square) ![GitHub last commit](https://img.shields.io/github/last-commit/SteveBeeblebrox/JSION?style=flat-square) ![GitHub issues](https://img.shields.io/github/issues-raw/SteveBeeblebrox/JSION?style=flat-square) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/SteveBeeblebrox/JSION?style=flat-square) ![GitHub contributors](https://img.shields.io/github/contributors/SteveBeeblebrox/JSION?color=007EC6\u0026style=flat-square) ![GitHub Repo stars](https://img.shields.io/github/stars/SteveBeeblebrox/JSION?style=flat-square)\n**J**ava**S**cript-**i**sh **O**bject **N**otation - A superset of JSON with comments, single quote strings, unquoted property names, trailing commas, and other quality of life features\n## Files\n+ `jsion.ts` - TypeScript source for JSION\n\n```ts\n// JSION TypeScript API\nnamespace JSION {\n    const transpile: (text: string) =\u003e string;\n    const parse: typeof JSON.parse;\n    const stringify: typeof JSON.stringify;\n}\n```\n+ `jsion.js` - Ready to use JavaScript\n+ More languages coming soon...\n## Syntax\nJSION adds the following features to standard JSON.\n### Comments\nText between `(*` and `*)` is treated as a comment. Comments may be placed anywhere except inside of string keys and values. To include a `*)` in a comment, escape the asterisk it with a backslash. JSION has no single line comments since it may be minified just like JSON.\n```ml\n{\n    (* User Profile (v1.0.0) *)\n    \"name\": \"Trinity\",\n    \"admin\": true (* Does user have admin powers? *)\n}\n```\n### Unquoted Property Names\nIf a property name is a simple JavaScript-like identifier (`[a-zA-Z_$][0-9a-zA-Z_$]*`), the surrounding quotes may be omitted.\n```js\n{\n    name: \"Trinity\",\n    nickname: \"Trin\"\n}\n```\n### Trailing Commas\nJust like in JavaScript, trailing commas after a value are ignored in objects and arrays.\n```js\n{\n    \"activity\": [\n        \"2021\",\n        \"2022\",\n        \"2024\",\n    ],\n}\n```\n### Single Quoted Strings\nStrings (as both keys and values) can use single quotes instead of double quotes. When using single quotes, double quotes do not need to be escaped, but internal single quotes do.\n```js\n{\n    'recent posts': [\n        '\"🔥 Heat from fire...\"',\n        \"\\\"Hello World!\\\"\",\n        '\"Isn\\'t this cool?\"'\n    ]\n}\n```\n### Numeric Separators\nSingle underscores can be placed within numbers between digits to improve readability. Underscores may not directly precede or follow a decimal point or an `e` or `E` if using exponential notation.\n```js\n{\n    \"points\": 1_000_000\n}\n```\n\n### Additional Numeric Literals\nJSION supports hexadecimal, octal, and binary integer literals. These all support the aforementioned numeric separators.\n```js\n{\n    \"colors\": [\n        0xAD4674,\n        0xC8_7F_93,\n        0o74571362,\n        0b111001001101001011000110,\n        0b0111_1011_0100_1100_0011_1010\n    ]\n}\n\n```\n\n### Shorthand Null\nOne or more question marks may be used in place of `null`.\n```js\n{\n    \"profile picture\": ???\n}\n```\n\n### Implicit Null Items\nMissing values in objects and arrays are interpreted as null. Note that trailing comma removal in arrays happens after!\n```js\n{\n    \"alt text\": ,\n    \"icons\": [,\"admin\",,,\"flower\",,]\n}\n```\n\u003c!--### Automatic Commas\nCommas (`,`) are optional after values in an object. If no value is present and the next part of the object is another key, this also works with implicit null values. (WIP)\n```\n{\n    \"favorite color\": \"pink\"\n    \"lucky number\": 142\n}\n```--\u003e\n\n## Complete Example\n\u003c!--\n```\nfunction ecws(text: string) {\n    return text.replaceAll(/[\\t\\n]/g,t=\u003e`\u0026#${t.charCodeAt(0)};`).replaceAll(/\\\\/g,'\\\\\\\\')\n}\n```\n--\u003e\n|          | JSION | JSON |\n| -------- | ----- | ---- | \n| Expanded | \u003cpre lang=js\u003e\u0026#10;{\u0026#10;    (\\* User Profile (v1.0.0) \\*)\u0026#10;    name: 'Trinity',\u0026#10;    nickname: 'Trin',\u0026#10;    admin: true (\\* Does user have admin powers? \\*),\u0026#10;    activity: [\u0026#10;        \"2021\", \"2022\", \"2024\",\u0026#10;    ],\u0026#10;    'recent posts': [\u0026#10;        '\"🔥 Heat from fire...\"',\u0026#10;        \"\\\\\"Hello World!\\\\\"\",\u0026#10;        '\"Isn\\\\'t this cool?\"',\u0026#10;    ],\u0026#10;    points: 1_000_000,\u0026#10;    colors: [\u0026#10;        0xAD4674,\u0026#10;        0xC8_7F_93,\u0026#10;        0o74571362,\u0026#10;        0b111001001101001011000110,\u0026#10;        0b0111_1011_0100_1100_0011_1010,\u0026#10;    ],\u0026#10;    \"profile picture\": ???,\u0026#10;    \"alt text\": ,\u0026#10;    icons: [,\"admin\",,,\"flower\",,],\u0026#10;}\u0026#10;\u003c/pre\u003e | \u003cpre lang=js\u003e{\u0026#10;    \"name\": \"Trinity\",\u0026#10;    \"nickname\": \"Trin\",\u0026#10;    \"admin\": true ,\u0026#10;    \"activity\": [\u0026#10;        \"2021\", \"2022\", \"2024\"\u0026#10;    ],\u0026#10;    \"recent posts\": [\u0026#10;        \"\\\\\"🔥 Heat from fire...\\\\\"\",\u0026#10;        \"\\\\\"Hello World!\\\\\"\",\u0026#10;        \"\\\\\"Isn't this cool?\\\\\"\"\u0026#10;    ],\u0026#10;    \"points\": 1000000,\u0026#10;    \"colors\": [\u0026#10;        11355764,\u0026#10;        13139859,\u0026#10;        15921906,\u0026#10;        14996166,\u0026#10;        8080442\u0026#10;    ],\u0026#10;    \"profile picture\": null,\u0026#10;    \"alt text\": null,\u0026#10;    \"icons\": [null,\"admin\",null,null,\"flower\",null]\u0026#10;}\u003c/pre\u003e |\n| Minified | \u003cpre lang=js\u003e\u0026#10;{(\\*User Profile (v1.0.0)\\*)name:'Trinity',\u0026#10;nickname:'Trin',admin:true(\\*Does user have admin \u0026#10;powers?\\*),activity:[\"2021\",\"2022\",\"2024\"],\u0026#10;'recent posts':['\"🔥 Heat from fire...\"',\u0026#10;\"\\\\\"Hello World!\\\\\"\",'\"Isn\\\\'t this cool?\"'],points:\u0026#10;1000000,colors:[0xAD4674,0xC8_7F_93,0o74571362,\u0026#10;0b111001001101001011000110,0b011110110100110000111010\u0026#10;],\"profile picture\":,\"alt text\":,\"icons\":[,\"admin\",,,\u0026#10;\"flower\",,]}\u0026#10;\u003c/pre\u003e | \u003cpre lang=js\u003e{\"name\":\"Trinity\",\"nickname\":\"Trin\",\u0026#10;\"admin\":true,\"activity\":[\"2021\",\"2022\",\"2024\"],\u0026#10;\"recent posts\":[\"\\\\\"🔥 Heat from fire...\\\\\"\",\u0026#10;\"\\\\\"Hello World!\\\\\"\",\"\\\\\"Isn't this cool?\\\\\"\"],\u0026#10;\"points\":1000000,\"colors\":[11355764,13139859,\u0026#10;15921906,14996166,8080442],\"profile picture\":null,\u0026#10;\"alt text\":null,\"icons\":[null,\"admin\",null,null,\u0026#10;\"flower\",null]}\u003c/pre\u003e |\n\n## Motivation \u0026 Goals\n+ JSION is designed for easier human use (like config files); when exchanging between machines, use JSON\n+ JSION should work the same regardless of being minified or expanded\n+ JSION must be a superset of JSON (All valid JSON is valid JSION and has the same meaning)\n\n## Planned Features\n+ Optimizations\n+ Allow semicolons to be used in place of commas\n+ Optional commas in objects\n+ Expand the stringify method to support inserting comments\n+ Expand the stringify method to use shorter space saving formats when possible\n+ Improve error messages\n+ Additional number formats for positive signs and more\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevebeeblebrox%2Fjsion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevebeeblebrox%2Fjsion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevebeeblebrox%2Fjsion/lists"}