{"id":15697503,"url":"https://github.com/kt3k/matango","last_synced_at":"2026-05-11T07:47:47.126Z","repository":{"id":57291815,"uuid":"90514100","full_name":"kt3k/matango","owner":"kt3k","description":"A fragment language, expressing key-value pairs, aims to be embedded in other languages.","archived":false,"fork":false,"pushed_at":"2018-03-16T12:54:03.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T21:04:43.088Z","etag":null,"topics":["dsl","json","key-value","language","matango","yaml"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kt3k.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":"2017-05-07T06:45:35.000Z","updated_at":"2021-06-10T13:40:26.000Z","dependencies_parsed_at":"2022-08-27T12:20:33.128Z","dependency_job_id":null,"html_url":"https://github.com/kt3k/matango","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kt3k/matango","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fmatango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fmatango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fmatango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fmatango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kt3k","download_url":"https://codeload.github.com/kt3k/matango/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fmatango/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261853290,"owners_count":23219837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dsl","json","key-value","language","matango","yaml"],"created_at":"2024-10-03T19:20:25.784Z","updated_at":"2026-05-11T07:47:47.081Z","avatar_url":"https://github.com/kt3k.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Matango\n\n[![CircleCI](https://circleci.com/gh/kt3k/matango.svg?style=svg)](https://circleci.com/gh/kt3k/matango)\n[![codecov](https://codecov.io/gh/kt3k/matango/branch/master/graph/badge.svg)](https://codecov.io/gh/kt3k/matango)\n\n\u003e A fragment language, expressing key-value pairs, aims to be embedded in other languages.\n\nMatango is a simple format for expressing lists of key-value pairs. It is easy for humans to read and write. It is easy for machines to parse and serialize.\n\nMatango is not a general purpose data exchange format like [JSON][JSON] or [YAML][YAML]. Rather it aims to serve as a DSL which is embedded in another language or DSL, such as HTML, YAML, JSON etc.\n\n# Example\n\nA typical matango line looks like the below.\n\n```\nfoo,bar,baz=quux,hello=Matango!\n```\n\nThis parses to:\n\n```json\n[\n  {\n    \"key\": \"foo\",\n    \"value\": null\n  },\n  {\n    \"key\": \"bar\",\n    \"value\": null\n  },\n  {\n    \"key\": \"baz\",\n    \"value\": \"quux\"\n  },\n  {\n    \"key\": \"hello\",\n    \"value\": \"Matango!\"\n  }\n]\n```\n\n# Syntax\n\nIn BNF:\n\n```\n\u003cline\u003e ::= \u003cpairs\u003e\n\u003cpairs\u003e ::= \u003cpair\u003e | \u003cpair\u003e \",\" \u003cpairs\u003e\n\u003cpair\u003e ::= \u003ckey\u003e | \u003ckey\u003e \"=\" \u003cvalue\u003e\n\u003ckey\u003e ::= \u003cchars\u003e\n\u003cvalue\u003e ::= \u003cchars\u003e\n\u003cchars\u003e ::= \u003cchar\u003e | \u003cchar\u003e \u003cchars\u003e\n\u003cchar\u003e ::= \u003calnum\u003e | \u003csymbol\u003e | \u003cwhitespace\u003e\n\u003calnum\u003e ::= \"a\" | ... | \"z\" | \"A\" | ... | \"Z\" | \"0\" | ... | \"9\"\n\u003csymbol\u003e ::= \"!\" | \"$\" | \"%\" | \"\u0026\" | \"{\" | \"}\" | \"\u003c\" | \"\u003e\" | \"[\" | \"]\" | \"-\" | \"|\" | \"^\" | \"~\" | \"+\" | \"*\" | \";\" | \":\" | \"\\\" | \".\" | \"/\" | \"\\\"\n\u003cwhitespace\u003e :: \" \" | \"\\t\"\n```\n\n**NOTE**: The following characters are invalid in Matango:\n\n```\n\\n (line break)\n\\r (carriage return)\n() (open and close parens)\n\" (double quote)\n' (single quote)\n```\n\nThis is to encourage the embedding of Matango into quotes or parens in other languages.\n\n# Notes (Semantics)\n\n- Each key-value pair is separated by `,`.\n- `\u003cwhitespaces\u003e` before and after each key and value are stripped.\n  - So there is no way to express a key or value which starts or ends with whitespaces.\n- There sould one or zero `=` symbol inside each key-value pair.\n  - if a key-value pair has more than one `=` symbol, then it should be a parse error.\n  - If there is no `=` symbol in key-value pair, that's ok and the value is `null` in that case.\n  - There is no way to include `=` symbol in key or value.\n- A key can be an empty string. (e.g. `=foo` parses to `[{\"key\": \"\", \"value\": \"foo\"}]`)\n- A value can be an empty string. (e.g. `foo=` parses to `[{\"key\": \"foo\", \"value\": \"\"}]`)\n- The same keys can appear in a single matango format. (e.g. `foo,foo,foo` is valid)\n- empty key-value pair is invalid\n  - For example `foo,,bar` is an invalid matango expression.\n\n# Parsers\n\n- JavaScript: [matango](https://npm.im/matango)\n\n# License\n\nMIT\n\n[CSV]: https://en.wikipedia.org/wiki/Comma-separated_values\n[JSON]: http://json.org/\n[YAML]: http://yaml.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fmatango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkt3k%2Fmatango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fmatango/lists"}