{"id":13801042,"url":"https://github.com/expelledboy/miffy","last_synced_at":"2026-04-13T21:04:20.357Z","repository":{"id":57526291,"uuid":"97380731","full_name":"expelledboy/miffy","owner":"expelledboy","description":"Jiffy and JSX wrapper which returns a more standard Erlang map.","archived":false,"fork":false,"pushed_at":"2018-09-24T13:57:21.000Z","size":13,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T21:02:51.262Z","etag":null,"topics":["jiffy","json","jsx","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/expelledboy.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}},"created_at":"2017-07-16T12:10:45.000Z","updated_at":"2022-03-29T01:06:48.000Z","dependencies_parsed_at":"2022-09-07T05:30:28.363Z","dependency_job_id":null,"html_url":"https://github.com/expelledboy/miffy","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expelledboy%2Fmiffy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expelledboy%2Fmiffy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expelledboy%2Fmiffy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expelledboy%2Fmiffy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/expelledboy","download_url":"https://codeload.github.com/expelledboy/miffy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254266365,"owners_count":22042095,"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":["jiffy","json","jsx","wrapper"],"created_at":"2024-08-04T00:01:18.944Z","updated_at":"2026-04-13T21:04:20.327Z","avatar_url":"https://github.com/expelledboy.png","language":"Erlang","funding_links":[],"categories":["Text and Numbers"],"sub_categories":[],"readme":"Miffy\n=====\n\n[![Travis](https://img.shields.io/travis/expelledboy/miffy.svg)](https://travis-ci.org/expelledboy/miffy)\n[![Hex.pm](https://img.shields.io/hexpm/v/miffy.svg)](https://hex.pm/packages/miffy)\n[![Hex.pm](https://img.shields.io/hexpm/dt/miffy.svg)](https://hex.pm/packages/miffy)\n\nJiffy and JSX wrapper which returns a more standard Erlang map.\n\n### Usage\n\nOptional data types can be passed as a second parameter, to provide seemless translation.\n\n```erlang\n{deps,\n [\n  {miffy, \".*\", {git, \"https://github.com/expelledboy/miffy.git\", {tag, \"2.0.0\"}}},\n  %% which requires either peer dependency\n  {jiffy, \".*\", {git, \"https://github.com/davisp/jiffy.git\", {tag, \"0.14.11\"}}},\n  {jsx, \".*\", {git, \"https://github.com/talentdeficit/jsx.git\", {tag, \"v2.9.0\"}}}\n ]}.\n```\n\n```erlang\nTypes = #{ atom =\u003e atom,\n\t   string =\u003e string,\n\t   collection =\u003e {collection, #{ key =\u003e atom }},\n\t   obj =\u003e #{ sub =\u003e atom } },\nErlang = #{ atom =\u003e value,\n\t    list =\u003e [\"value\"],\n\t    collection =\u003e [#{ key =\u003e one }, #{ key =\u003e two }],\n\t    string =\u003e \"value\",\n\t    bool =\u003e true,\n\t    integer =\u003e 1,\n\t    float =\u003e 1.0,\n\t    obj =\u003e #{ sub =\u003e value } },\nJson = miffy:encode(Erlang, Types),\nAtomStr = '{\"string\":\"value\",\"obj\":{\"sub\":\"value\"},\"list\":[[118,97,108,117,101]],\"integer\":1,\"float\":1.0,\"collection\":[{\"key\":\"two\"},{\"key\":\"one\"}],\"bool\":true,\"atom\":\"value\"}',\nJson = erlang:atom_to_binary(AtomStr, latin1), %% HACK dont do this to create strings\nErlang = miffy:decode(Json, Types).\n```\n\n### Note\n\nMiffy does NOT attempt to translate lists deeply, see unit tests for example behaviour.\n\nHowever (as seen above) a collection type exists, which is a list containing objects of the same type.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpelledboy%2Fmiffy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpelledboy%2Fmiffy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpelledboy%2Fmiffy/lists"}