{"id":17680866,"url":"https://github.com/devnote-dev/xmlt","last_synced_at":"2025-05-12T23:10:15.354Z","repository":{"id":44425176,"uuid":"476823553","full_name":"devnote-dev/xmlt","owner":"devnote-dev","description":"XML (de)serializing with classes and structs","archived":false,"fork":false,"pushed_at":"2024-04-19T13:14:22.000Z","size":75,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T23:09:51.744Z","etag":null,"topics":["crystal","crystal-lang","xml","xml-deserialization","xml-serialization"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/devnote-dev.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-04-01T18:08:50.000Z","updated_at":"2023-04-01T08:48:57.000Z","dependencies_parsed_at":"2024-10-24T10:54:53.752Z","dependency_job_id":"ccf01e60-3c10-4442-9c5e-da172a5ea8f3","html_url":"https://github.com/devnote-dev/xmlt","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnote-dev%2Fxmlt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnote-dev%2Fxmlt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnote-dev%2Fxmlt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnote-dev%2Fxmlt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devnote-dev","download_url":"https://codeload.github.com/devnote-dev/xmlt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837452,"owners_count":21971984,"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":["crystal","crystal-lang","xml","xml-deserialization","xml-serialization"],"created_at":"2024-10-24T09:09:22.171Z","updated_at":"2025-05-12T23:10:15.334Z","avatar_url":"https://github.com/devnote-dev.png","language":"Crystal","readme":"# XML Transformer\nA library for serializing and deserializing XML documents with classes and structs. This follows the same includable syntax used in the standard library's JSON and YAML modules.\n\n## Installation\n1. Add the dependency to your `shard.yml`:\n\n```yaml\ndependencies:\n  xmlt:\n    github: devnote-dev/xmlt\n```\n\n2. Run `shards install`\n\n## Basic Usage\n```crystal\nrequire \"xmlt\"\n\nxml_str = %(\u003cNumbers\u003e\u003cone\u003e1\u003c/one\u003e\u003ctwo\u003e2\u003c/two\u003e\u003cthree\u003e3\u003c/three\u003e\u003c/Numbers\u003e)\nhash = Hash(String, Int32).from_xml xml_str, root: \"Numbers\"\nputs hash # =\u003e {\"one\" =\u003e 1, \"two\" =\u003e 2, \"three\" =\u003e 3}\n\nputs hash.to_xml # =\u003e \u003cone\u003e1\u003c/one\u003e\u003ctwo\u003e2\u003c/two\u003e\u003cthree\u003e3\u003c/three\u003e\n```\n\n## Structured Usage\n```crystal\nrequire \"xmlt\"\n\nclass Animal\n  # include the module so we can (de)serialize it\n  include XMLT::Serializable\n\n  property name : String\n  @[XMT::Field(key: \"species\")]\n  property kind : String\n  @[XMLT::Field(omit_nil: true)]\n  property family : String?\n\n  def initialize(@name, @kind, @family = nil)\n  end\nend\n\nfox = Animal.new \"fox\", \"mammal\"\nfox.to_xml # =\u003e \u003cAnimal\u003e\u003cspecies\u003emammal\u003c/species\u003e\u003c/Animal\u003e\n\nfox.family = \"dog\"\nfox.to_xml # =\u003e \u003cAnimal\u003e\u003cspecies\u003emammal\u003c/species\u003e\u003cfamily\u003edog\u003c/family\u003e\u003c/Animal\u003e\n```\n\n## Contributing\n1. Fork it (\u003chttps://github.com/devnote-dev/xmlt/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n- [Devonte](https://github.com/devnote-dev) - creator and maintainer\n\nThis repository is managed under the MIT license.\n\n© 2022 devnote-dev\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnote-dev%2Fxmlt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevnote-dev%2Fxmlt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnote-dev%2Fxmlt/lists"}