{"id":23618875,"url":"https://github.com/xavierog/yamelish","last_synced_at":"2026-02-07T16:02:35.001Z","repository":{"id":62590418,"uuid":"458516246","full_name":"xavierog/yamelish","owner":"xavierog","description":"YAML-ish, non parsable format, suitable to diff JSON data","archived":false,"fork":false,"pushed_at":"2025-01-04T19:10:25.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T02:22:14.833Z","etag":null,"topics":["diff","json","yaml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xavierog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2022-02-12T12:30:46.000Z","updated_at":"2025-01-04T19:10:28.000Z","dependencies_parsed_at":"2025-04-09T18:11:28.065Z","dependency_job_id":"088f0379-0a73-40e6-93ce-e0fa4d3dfeab","html_url":"https://github.com/xavierog/yamelish","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xavierog/yamelish","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fyamelish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fyamelish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fyamelish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fyamelish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xavierog","download_url":"https://codeload.github.com/xavierog/yamelish/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavierog%2Fyamelish/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29199519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T14:35:27.868Z","status":"ssl_error","status_checked_at":"2026-02-07T14:25:51.081Z","response_time":63,"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":["diff","json","yaml"],"created_at":"2024-12-27T19:32:55.137Z","updated_at":"2026-02-07T16:02:34.991Z","avatar_url":"https://github.com/xavierog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yamelish\n\nyamelish is a non-parsable YAML-ish output format that was designed as a convenience to diff JSON files.\n\n\"non-parsable\" means that yamelish was not designed to be parsed by computers. It might actually be parsable with some care and caveats (e.g. no way to distinguish boolean/null values from their string counterparts), but this is not the object of this project.\n\nYAML-ish means that it looks like YAML but is not YAML. Specifically, it looks like YAML, without quotes (except for empty strings), indicators like `\u003e` or `|` and advanced features:\n```yaml\npostId: 1\nid: 1\nname: id labore ex et quam laborum\nemail: Eliseo@gardner.biz\nbody:\n  laudantium enim quasi est quidem magnam voluptate ipsam eos\n  tempora quo necessitatibus\n  dolor quam autem quasi\n  reiciendis et nam sapiente accusantium\nexamples:\n  booleans:\n    - True\n    - False\n  null_value: None\n  integer: 4\n  float: 4.4\n  empty_string: \"\"\n  empty_array: []\n  empty_object: {}\n```\n\nyamelish's main limitation is that it offers no way to distinguish non-string values from their textual representation: the \"True\" string and the true boolean values will both end up as `True`. Consequently, yamelish remains relevant to spot changing values and structures but not changing types.\n\n## Command-line usage\n\n```console\n$ yamelish file1.json file2.json\n```\n\n## Git usage\n\nGit configuration (typically `~/.config/git/config`):\n```ini\n[diff \"json_diff\"]\n    textconv = /path/to/yamelish\n; Optional:\n[alias]\n    showobject = show --ext-diff\n```\n\nRepository's `.gitattributes` file:\n```gitattributes\n*.json diff=json_diff\n```\n\n## Python usage\n\n```python\nfrom yamelish.handlers import handle\nyamelish = handle(your_data)[0]\nprint(yamelish)\n```\n\n## Why not ... ?\n\n### Why not JSON?\n\nJSON diff is hard to read because of:\n\n- escaped strings:\n  - `\"this\\nis\\na\\nmultiline\\nstring\\nand\\nthis\\nis\\npainful\"`\n  - `\"\\\"wait, what?\\\"\"`\n- extra commas when appending to an array:\n\n```diff\n {\n    \"array\": [\n        \"a\",\n-       \"b\"\n+       \"b\",\n+       \"c\"\n    ]\n }\n```\n\n### Why not gron?\n\nBecause the gron format reflects array indices, inserting an element into an array makes diff way longer than expected:\n\n```diff\n json = {};\n json.array = [];\n-json.array[0] = \"a\";\n-json.array[1] = \"b\";\n+json.array[0] = \"z\";\n+json.array[1] = \"a\";\n+json.array[2] = \"b\";\n```\n\n### Why not YAML?\n\nYAML is better but it still clutters the output with quotes, escaped values and/or little things like `|-`; this is because YAML is a format that is meant to be parsed, so it has to keep this kind of things.\n\n\n```diff\n array:\n - \"# this string is double-quoted because otherwise it would be a YAML comment\"\n-- \"# this string is double-quoted because otherwise it would be a YAML comment\"\n+- this string is no longer double-quoted\n - \"# this string is double-quoted because otherwise it would be a YAML comment\"\n```\n\n## License\n\nyamelish is licensed under WTFPL.\nCopyright (c) 2022-2026 Xavier G.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavierog%2Fyamelish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxavierog%2Fyamelish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavierog%2Fyamelish/lists"}