{"id":20124998,"url":"https://github.com/jpcima/tinysdl","last_synced_at":"2026-03-04T09:31:47.814Z","repository":{"id":106389058,"uuid":"58831071","full_name":"jpcima/tinysdl","owner":"jpcima","description":"A tiny SDLang parsing library","archived":false,"fork":false,"pushed_at":"2016-05-16T17:44:17.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-26T13:55:33.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpcima.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-05-14T21:21:24.000Z","updated_at":"2016-05-14T21:24:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e256254-744d-4b7f-ba3d-d9c964251fae","html_url":"https://github.com/jpcima/tinysdl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jpcima/tinysdl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcima%2Ftinysdl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcima%2Ftinysdl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcima%2Ftinysdl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcima%2Ftinysdl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpcima","download_url":"https://codeload.github.com/jpcima/tinysdl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpcima%2Ftinysdl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30077073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"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":[],"created_at":"2024-11-13T19:54:10.640Z","updated_at":"2026-03-04T09:31:47.792Z","avatar_url":"https://github.com/jpcima.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TinySDL\nTinySDL is not exactly a parser library for the [SDLang](https://sdlang.org/) data language.\n\nI develop this as part of a larger project where the other library does not provide the feature I need, which is operation at compile time.\nI only implement the features I need, so you should only use this if you have a good reason not to prefer [SDLang-D](https://github.com/Abscissa/SDLang-D).\n\nGoal of this project:\n* Providing a compact yet robust D implementation\n* Ability to parse at compile time\n* Limited compatibility with SDLang\n\nNon-goals:\n* Full compatibility\n* Write support\n\n## Parsing and traversal\n\nThe library features simple DOM style parsing and traversal.\n\n    import tinysdl;\n    ///\n    Tag root = parse(aSourceText);\n    foreach (Tag child; root.children) {\n      ///\n      foreach (Attribute attr; child.attributes) {\n        ///\n      }\n    }\n\n## Destructuring\n\nAnother way to process homogeneous inputs is to use the provided destructuring functionality.\n\nIt is similar in concept to the package [std.getopt](https://dlang.org/phobos/std_getopt.html) of the Phobos standard library.\n\n    import tinysdl;\n    import tinysdl.destructuring;\n    ///\n    enum source = `example aText=\"someText\" aReal=3.14 aBoolean=true`;\n    string aText;\n    double aReal;\n    bool aBoolean;\n    destructureAttributes(parse(source).child(0),\n                          option.required, \"aText\", \u0026aText,\n                          option.required, \"aReal\", \u0026aReal,\n                          option.required, \"aBoolean\", \u0026aBoolean);\n\n## Notes\n\nRefer to [tests.d](source/tinysdl/tests.d) and [destructuring/tests.d](source/tinysdl/destructuring/tests.d) for some usage examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpcima%2Ftinysdl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpcima%2Ftinysdl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpcima%2Ftinysdl/lists"}