{"id":26600828,"url":"https://github.com/patitotective/kdl-nim","last_synced_at":"2025-08-25T23:13:58.428Z","repository":{"id":108774320,"uuid":"529060019","full_name":"Patitotective/kdl-nim","owner":"Patitotective","description":"KDL Nim implementation.","archived":false,"fork":false,"pushed_at":"2024-11-21T16:47:06.000Z","size":1058,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-08T15:49:15.541Z","etag":null,"topics":["document-language","kdl","nim","nim-lang","nimlang","parser"],"latest_commit_sha":null,"homepage":"https://patitotective.github.io/kdl-nim/","language":"Nim","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/Patitotective.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":"2022-08-26T00:25:04.000Z","updated_at":"2025-06-30T18:55:47.000Z","dependencies_parsed_at":"2024-11-11T20:27:39.264Z","dependency_job_id":"e81229ea-f42c-4f8c-9fd7-a93ec1089953","html_url":"https://github.com/Patitotective/kdl-nim","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Patitotective/kdl-nim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patitotective%2Fkdl-nim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patitotective%2Fkdl-nim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patitotective%2Fkdl-nim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patitotective%2Fkdl-nim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Patitotective","download_url":"https://codeload.github.com/Patitotective/kdl-nim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patitotective%2Fkdl-nim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272144725,"owners_count":24881153,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"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":["document-language","kdl","nim","nim-lang","nimlang","parser"],"created_at":"2025-03-23T18:35:36.732Z","updated_at":"2025-08-25T23:13:58.398Z","avatar_url":"https://github.com/Patitotective.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kdl-nim\n[![Nim](https://img.shields.io/badge/Made%20with%3A-Nim-yellow?style=flat\u0026logo=nim\u0026logoColor=white)](https://nim-lang.org)\n[![Tests](https://github.com/Patitotective/kdl-nim/actions/workflows/tests.yml/badge.svg)](https://github.com/Patitotective/kdl-nim/actions/workflows/tests.yml)\n\n[KDL](https://kdl.dev/) Nim implementation.\n\n## Installation\n```\nnimble install kdl\n```\nOr directly from this repository:\n```\nnimble install https://github.com/Patitotective/kdl-nim\n```\n\n## Features\n- Pure Nim with no dependencies.\n- Streams support\n- Compile-time parsing support\n- [Decoder/Desializer](https://patitotective.github.io/kdl-nim/kdl/decoder.html)\n- [Encoder/Serializer](https://patitotective.github.io/kdl-nim/kdl/encoder.html)\n- [JSON-in-KDL](https://github.com/kdl-org/kdl/blob/main/JSON-IN-KDL.md) ([JiK](https://patitotective.github.io/kdl-nim/kdl/jik.html))\n- [XML-in-KDL](https://github.com/kdl-org/kdl/blob/main/XML-IN-KDL.md) ([Xik](https://patitotective.github.io/kdl-nim/kdl/xik.html))\n- [Prefs](https://patitotective.github.io/kdl-nim/kdl/prefs.html)\n\n## Overview\n```nim\nimport kdl\n\nvar doc = parseKdl(\"\"\"\n// Nodes can be separated into multiple lines\ntitle \\\n  \"Some title\"\n\n  // Files must be utf8 encoded!\n  smile (emoji)\"😁\" {\n        upside-down (emoji)\"🙃\"\n  }\n\n  // Instead of anonymous nodes, nodes and properties can be wrapped\n  // in \"\" for arbitrary node names.\n  \"!@#$@$%Q#$%~@!40\" \"1.2.3\" \"!!!!!\"=true\n\n  // The following is a legal bare identifier:\n  foo123~!@#$%^\u0026*.:'|?+ \"weeee\"\n\n  // And you can also use unicode!\n  ノード お名前=\"☜(ﾟヮﾟ☜)\"\n\n  // kdl specifically allows properties and values to be\n  // interspersed with each other, much like CLI commands.\n  foo bar=true \"baz\" quux=false 1 2 3\n  \"\"\") # You can also read files using parseKdlFile(\"file.kdl\")\n\n# Nodes are represented like:\n# type KdlNode* = object\n#   tag*: Option[string]\n#   name*: string\n#   args*: seq[KdlVal]\n#   props*: Table[string, KdlVal]\n#   children*: seq[KdlNode]\n\nassert doc[0].args[0].isString() # title \"Some title\"\n\nassert doc[1].args[0] == \"😁\" # smile node\nassert doc[1].args[0].tag.isSome and doc[1].args[0].tag.get == \"emoji\" # Type annotation\nassert doc[1].children[0].args[0] == \"🙃\" # smile node's upside-down child\n\nassert doc[2].name == \"!@#$@$%Q#$%~@!40\"\n\nassert doc[^1][\"quux\"] == false\n\ndoc[0].args[0].setString(\"New title\")\n\n# toKdlNode is a macro that facilitates the creation of `KdlNode`s, there's also toKdl (to create documents) and toKdlVal\ndoc[1].children[0] = toKdlNode: sunglasses(\"😎\"[emoji], 3.14)\n\nassert $doc[1].children[0] == \"\\\"sunglasses\\\" (\\\"emoji\\\")\\\"😎\\\" 3.14\"\n\nassert doc[1].children[0].args[1].get(uint8) == 3u8 # Converts 3.14 into an uint8\n\ndoc[^1][\"bar\"].setTo(false) # Same as setBool(false)\n\nwriteFile(\"doc.kdl\", doc)\n```\n\n## Docs\nDocumentation is live at https://patitotective.github.io/kdl-nim/.\n\n## TODO\n- Implement [KDL schema language](https://github.com/kdl-org/kdl/blob/main/SCHEMA-SPEC.md).\n- Implement [KDL query language](https://github.com/kdl-org/kdl/blob/main/QUERY-SPEC.md).\n- Support OrderedTables\n\n## About\n- GitHub: https://github.com/Patitotective/kdl-nim.\n- Discord: https://discord.gg/U23ZQMsvwc.\n- Docs: https://patitotective.github.io/kdl-nim/.\n\nContact me:\n- Discord: **Patitotective#0127**.\n- Twitter: [@patitotective](https://twitter.com/patitotective).\n- Email: **cristobalriaga@gmail.com**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatitotective%2Fkdl-nim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatitotective%2Fkdl-nim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatitotective%2Fkdl-nim/lists"}