{"id":25651591,"url":"https://github.com/lexhide/maptu","last_synced_at":"2025-12-12T00:22:59.482Z","repository":{"id":57520877,"uuid":"53867912","full_name":"lexhide/maptu","owner":"lexhide","description":"Tiny library to convert from \"encoded\" maps to Elixir structs.","archived":false,"fork":false,"pushed_at":"2020-02-11T04:06:50.000Z","size":13,"stargazers_count":28,"open_issues_count":3,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-02T05:23:27.895Z","etag":null,"topics":["elixir"],"latest_commit_sha":null,"homepage":"http://hexdocs.pm/maptu","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/lexhide.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-14T15:25:10.000Z","updated_at":"2023-07-11T20:31:32.000Z","dependencies_parsed_at":"2022-09-26T18:01:07.747Z","dependency_job_id":null,"html_url":"https://github.com/lexhide/maptu","commit_stats":null,"previous_names":["whatyouhide/maptu"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexhide%2Fmaptu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexhide%2Fmaptu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexhide%2Fmaptu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexhide%2Fmaptu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexhide","download_url":"https://codeload.github.com/lexhide/maptu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167446,"owners_count":21223506,"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"],"created_at":"2025-02-23T17:17:48.993Z","updated_at":"2025-12-12T00:22:59.434Z","avatar_url":"https://github.com/lexhide.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maptu\n\n[![Build Status](https://travis-ci.org/lexhide/maptu.svg?branch=master)](https://travis-ci.org/lexhide/maptu)\n[![Hex.pm](https://img.shields.io/hexpm/v/maptu.svg)](https://hex.pm/packages/maptu)\n\nMaptu is a small Elixir library that provides functions to convert from\n\"encoded\" maps to Elixir structs.\n\n\"Encoded\" maps are maps/structs that have been encoded through some protocol\n(like MessagePack or JSON) decoded back from that protocol. In the case of\nstructs, the information about the struct is lost, usually like this:\n\n```elixir\n%URI{port: 8080} |\u003e encode() |\u003e decode()\n#=\u003e %{\"__struct__\" =\u003e \"Elixir.URI\", \"port\" =\u003e 8080}\n```\n\nMaptu's job is to get that map with string keys back to an Elixir struct in a\nsafe way (to avoid memory leaks coming from mindlessly converting string keys to\natoms):\n\n```elixir\n%URI{port: 8080} |\u003e encode() |\u003e decode() |\u003e Maptu.struct!()\n#=\u003e %URI{port: 8080}\n```\n\n## Credit\n\nMost of the design and implementation ideas in this library come from the\nawesome [@lexmag](https://github.com/lexmag) :heart:\n\n## Installation\n\nAdd `:maptu` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:maptu, \"~\u003e 1.0\"}]\nend\n```\n\nand be sure to add `:maptu` to your list of started applications:\n\n```elixir\ndef application do\n  [applications: [:maptu]]\nend\n```\n\n[Documentation is available on Hex.][hex-docs]\n\n## License\n\nMIT © 2016 Andrea Leopardi, Aleksei Magusev ([license file](LICENSE.txt))\n\n\n[hex-docs]: http://hexdocs.pm/maptu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexhide%2Fmaptu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexhide%2Fmaptu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexhide%2Fmaptu/lists"}