{"id":20078808,"url":"https://github.com/nasso/libtilix","last_synced_at":"2026-05-15T08:34:25.956Z","repository":{"id":92714802,"uuid":"256357992","full_name":"nasso/libtilix","owner":"nasso","description":"Pure C library for parsing JSON files exported from Tiled.","archived":false,"fork":false,"pushed_at":"2021-02-05T03:30:58.000Z","size":165,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T22:29:32.743Z","etag":null,"topics":["json","tiled-map-editor"],"latest_commit_sha":null,"homepage":"https://www.mapeditor.org/","language":"C","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/nasso.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-17T00:05:46.000Z","updated_at":"2025-03-10T14:36:03.000Z","dependencies_parsed_at":"2023-03-25T00:07:12.470Z","dependency_job_id":null,"html_url":"https://github.com/nasso/libtilix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nasso/libtilix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasso%2Flibtilix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasso%2Flibtilix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasso%2Flibtilix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasso%2Flibtilix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nasso","download_url":"https://codeload.github.com/nasso/libtilix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasso%2Flibtilix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33059519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","tiled-map-editor"],"created_at":"2024-11-13T15:16:44.326Z","updated_at":"2026-05-15T08:34:25.939Z","avatar_url":"https://github.com/nasso.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libtilix\n\nC library to parse JSON files exported from [Tiled](https://www.mapeditor.org).\n\n## Usage\n\nThe library tries its best to mirror the JSON it parses, with some useful type\nmappings (e.g. using `enum`s when it is relevant).\n\n```c\n#include \u003cstdio.h\u003e\n#include \u003cstdlib.h\u003e\n#include \"tilix/tilix.h\"\n\nint main(int ac, char **av)\n{\n  tl_map_t map;\n\n  if (ac != 2) {\n    printf(\"Usage: %s \u003cmap\u003e\\n\", av[0]);\n    return (1);\n  }\n\n  if (tl_map_load(av[1], \u0026map)) {\n    printf(\"Couldn't load the map!\\n\");\n    return (1);\n  }\n\n  printf(\"Loaded map: '%s'\\n\", map.name);\n  tl_map_deinit(\u0026map);\n  return (0);\n}\n```\n\n## Building and testing\n\nPre-requisites:\n  - GNU `make` (I don't know which version but I have 4.1).\n  - `gcc` \u003e= 7.5 or `clang` \u003e= 6.0.0 (same as above, I only tested that)\n\nThis library has some dependencies that will be `git clone`d automatically when\ncalling `make`. Yes, I know git submodules are a thing. I just can't use it\nbecause of many constraints described further down this readme.\n\n```sh\ngit clone https://github.com/nasso/libtilix.git\ncd libtilix\nmake\n```\n\nTo run the tests (you'll need to have\n[Criterion](https://github.com/Snaipe/Criterion.git) installed on your system).\n\n```sh\nmake tests_run\n```\n\n## Scope\n\nSome things to keep in mind about this library:\n- It will only work on UNIX (it needs `unistd.h`).\n- It only **parses** files. It cannot export.\n- It was originally made for a school project. Since we are not allowed to use\n  most of the libc, I've made [my own](https://github.com/nasso/libmy), and\n  `libtilix` uses it. If some people are interested in using `libtilix`, some\n  work would have to be done to port it to the libc (if needed).\n\n## Coding style\n\nThe code follows a particular coding style enforced by my school. The most\nimportant aspects are:\n- No more than 5 functions in a `*.c` file.\n- No more than 3 levels of branching.\n- No more than 1 `else if` in a branching chain.\n- No `typedef`s in `*.c` files.\n- No structure arguments passed by value (always use a pointer).\n- Functions must not exceed 20 lines.\n- Variable declarations must always be done at the top of the function scope.\n- The only empty line in functions is the one separating variable declarations\n  with the rest of the function's body.\n- Source files must start with some header containing the project name and file\n  description.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasso%2Flibtilix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnasso%2Flibtilix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasso%2Flibtilix/lists"}