{"id":20852082,"url":"https://github.com/icedragon200/kuddle","last_synced_at":"2025-06-20T23:09:35.612Z","repository":{"id":57514301,"uuid":"406372221","full_name":"IceDragon200/kuddle","owner":"IceDragon200","description":"A KDL encoder/decoder","archived":false,"fork":false,"pushed_at":"2025-01-27T18:32:11.000Z","size":262,"stargazers_count":31,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-20T23:08:44.622Z","etag":null,"topics":["elixir","kdl"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/IceDragon200.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2021-09-14T13:11:34.000Z","updated_at":"2025-02-19T16:53:41.000Z","dependencies_parsed_at":"2024-12-26T16:27:50.045Z","dependency_job_id":"fad39340-4560-4f9d-921e-3206919bc94d","html_url":"https://github.com/IceDragon200/kuddle","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"2c65f8a90f883387bf1e10e70ec6ec14d89065b1"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/IceDragon200/kuddle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceDragon200%2Fkuddle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceDragon200%2Fkuddle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceDragon200%2Fkuddle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceDragon200%2Fkuddle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IceDragon200","download_url":"https://codeload.github.com/IceDragon200/kuddle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceDragon200%2Fkuddle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261032114,"owners_count":23100051,"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":["elixir","kdl"],"created_at":"2024-11-18T03:16:14.679Z","updated_at":"2025-06-20T23:09:30.597Z","avatar_url":"https://github.com/IceDragon200.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kuddle\n\nKuddle is a [KDL v1 and v2](https://github.com/kdl-org/kdl) Encoder and Decoder library for Elixir.\n\n## Installation (V2)\n\nTo add `kuddle` with v2 support to your project:\n\n```elixir\ndefp deps do\n  [\n    {:kuddle, \"~\u003e 1.0.0\"},\n  ]\nend\n```\n\n## Installation (legacy V1)\n\nTo add `kuddle` with original v1 to your project:\n\n```elixir\ndefp deps do\n  [\n    {:kuddle, \"~\u003e 0.2.1\"},\n  ]\nend\n```\n\n## Usage\n\n```elixir\n# Decode a KDL v2 document\n{:ok, kdl_doc, []} = Kuddle.decode(kdl_blob)\n\n# Encode a KDL v2 document\n{:ok, kdl_blob} = Kuddle.encode(kdl_doc)\n\n# Lookup nodes in a document\nnodes = Kuddle.select(kdl_doc, [\"node name\"])\nnodes = Kuddle.select(kdl_doc, [{:attr, \"attribute name\"}])\nnodes = Kuddle.select(kdl_doc, [{:attr, \"attribute name\", \"attribute value\"}])\nnodes = Kuddle.select(kdl_doc, [{:value, \"value\"}])\n```\n\nWant to use KDL to configure your elixir next project?\n\nCheck out [kuddle_config](https://github.com/IceDragon200/kuddle_config)\n\n## Test Cases\n\n`test/fixtures/{v1,v2}/test_cases` contains a copy of the official language tests for their respective spec versions.\n\n## Supports\n\n* [x] Keywords\n\n```elixir\n{:ok, nodes, []} = Kuddle.decode(\"\"\"\n  node-true #true\n  node-false #false\n  node-null #null\n  node-nan #nan\n  node-inf #inf\n  node--inf #-inf\n  \"\"\"\n)\n\n[\n  %Kuddle.Node{\n    name: \"node-true\",\n    attributes: [\n      %Kuddle.Value{\n        type: :boolean,\n        value: true\n      }\n    ]\n  },\n  %Kuddle.Node{\n    name: \"node-false\",\n    attributes: [\n      %Kuddle.Value{\n        type: :boolean,\n        value: false\n      }\n    ]\n  },\n  %Kuddle.Node{\n    name: \"node-null\",\n    attributes: [\n      %Kuddle.Value{\n        type: :null,\n        value: nil\n      }\n    ]\n  },\n  %Kuddle.Node{\n    name: \"node-nan\",\n    attributes: [\n      %Kuddle.Value{\n        type: :nan,\n        value: :nan\n      }\n    ]\n  },\n  %Kuddle.Node{\n    name: \"node-inf\",\n    attributes: [\n      %Kuddle.Value{\n        type: :infinity,\n        value: :infinity\n      }\n    ]\n  },\n  %Kuddle.Node{\n    name: \"node--inf\",\n    attributes: [\n      %Kuddle.Value{\n        type: :infinity,\n        value: :'-infinity'\n      }\n    ]\n  }\n] = ndoes\n```\n\n* [x] Nodes\n\n```elixir\n{:ok, nodes, []} = Kuddle.decode(\"\"\"\n  node {\n    node2 {\n      node3\n    }\n  }\n  \"\"\"\n)\n\n[\n  %Kuddle.Node{\n    name: \"node\",\n    children: [\n      %Kuddle.Node{\n        name: \"node2\",\n        children: [\n          %Kuddle.Node{\n            name: \"node3\",\n          }\n        ]\n      }\n    ]\n  }\n] = ndoes\n```\n\n* [x] Annotations\n\n```elixir\n{:ok, nodes, []} = Kuddle.decode(\"\"\"\n  (root)node {\n    node2 (u8)23 {\n      node3\n    }\n  }\n  \"\"\"\n)\n\n[\n  %Kuddle.Node{\n    name: \"node\",\n    annotations: [\"root\"],\n    children: [\n      %Kuddle.Node{\n        name: \"node2\",\n        attributes: [\n          %Kuddle.Value{\n            type: :integer,\n            format: :dec,\n            annotations: [\"u8\"],\n            value: 23,\n          }\n        ],\n        children: [\n          %Kuddle.Node{\n            name: \"node3\",\n          }\n        ]\n      }\n    ]\n  }\n] = nodes\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficedragon200%2Fkuddle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficedragon200%2Fkuddle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficedragon200%2Fkuddle/lists"}