{"id":18254727,"url":"https://github.com/fabienhenon/jsonapi-deserializer","last_synced_at":"2026-02-05T05:01:10.963Z","repository":{"id":57509895,"uuid":"181868803","full_name":"FabienHenon/jsonapi-deserializer","owner":"FabienHenon","description":"JsonApi Deserializer for Elixir","archived":false,"fork":false,"pushed_at":"2019-04-17T13:18:01.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-27T17:54:27.771Z","etag":null,"topics":[],"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/FabienHenon.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":"2019-04-17T10:26:59.000Z","updated_at":"2023-07-17T13:31:38.000Z","dependencies_parsed_at":"2022-09-26T17:51:21.412Z","dependency_job_id":null,"html_url":"https://github.com/FabienHenon/jsonapi-deserializer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/FabienHenon/jsonapi-deserializer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienHenon%2Fjsonapi-deserializer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienHenon%2Fjsonapi-deserializer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienHenon%2Fjsonapi-deserializer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienHenon%2Fjsonapi-deserializer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FabienHenon","download_url":"https://codeload.github.com/FabienHenon/jsonapi-deserializer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienHenon%2Fjsonapi-deserializer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29113188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T03:44:17.043Z","status":"ssl_error","status_checked_at":"2026-02-05T03:44:12.077Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-05T10:13:22.138Z","updated_at":"2026-02-05T05:01:10.936Z","avatar_url":"https://github.com/FabienHenon.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JsonApiDeserializer\n\nJson api deserializer able to deserialize json api documents with relationships for Elixir projects.\n\n## Installation\n\nThe package can be installed by adding `jsonapi_deserializer` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:jsonapi_deserializer, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nDocumentation [https://hexdocs.pm/jsonapi_deserializer](https://hexdocs.pm/jsonapi_deserializer).\n\n## Example \n\nUsing the json api deserializer with a payload like this:\n\n```\n  {\n      \"data\": [\n          {\n              \"type\": \"posts\",\n              \"id\": \"13608770-76dd-47e5-a1c4-4d0d9c2483ad\",\n              \"links\": {\n                  \"self\": \"http://link-to-post/1\"\n              },\n              \"attributes\": {\n                  \"title\": \"First post\",\n                  \"content\": \"First post content\"\n              },\n              \"relationships\": {\n                  \"creator\": {\n                      \"data\": {\n                          \"type\": \"creators\",\n                          \"id\": \"22208770-76dd-47e5-a1c4-4d0d9c2483ad\"\n                      },\n                      \"links\": {\n                          \"related\": \"http://link-to-creator/1\"\n                      }\n                  },\n                  \"comments\": {\n                      \"links\": {},\n                      \"data\": [\n                          {\n                              \"type\": \"comment\",\n                              \"id\": \"22208770-76dd-47e5-a1c4-4d0d9c2483ab\"\n                          },\n                          {\n                              \"type\": \"comment\",\n                              \"id\": \"cb0759b0-03ab-4291-b067-84a9017fea6f\"\n                          }\n                      ]\n                  }\n              }\n          },\n          {\n              \"type\": \"posts\",\n              \"id\": \"13608770-76dd-47e5-a1c4-4d0d9c2483ae\",\n              \"links\": {\n                  \"self\": \"http://link-to-post/2\"\n              },\n              \"attributes\": {\n                  \"title\": \"Second post\",\n                  \"content\": \"Second post content\"\n              },\n              \"relationships\": {\n                  \"creator\": {\n                      \"data\": {\n                          \"type\": \"creators\",\n                          \"id\": \"22208770-76dd-47e5-a1c4-4d0d9c2483ad\"\n                      },\n                      \"links\": {\n                          \"related\": \"http://lnk-to-creator/1\"\n                      }\n                  },\n                  \"comments\": {\n                      \"links\": {},\n                      \"data\": [\n                          {\n                              \"type\": \"comment\",\n                              \"id\": \"22208770-76dd-47e5-a1c4-4d0d9c2483ac\"\n                          }\n                      ]\n                  }\n              }\n          }\n      ],\n      \"included\": [\n          {\n              \"type\": \"creators\",\n              \"id\": \"22208770-76dd-47e5-a1c4-4d0d9c2483ad\",\n              \"attributes\": {\n                  \"firstname\": \"John\",\n                  \"lastname\": \"Doe\"\n              },\n              \"links\": {\n                  \"self\": \"http://link-to-creator/1\"\n              },\n              \"relationships\": {}\n          },\n          {\n              \"type\": \"comment\",\n              \"id\": \"22208770-76dd-47e5-a1c4-4d0d9c2483ac\",\n              \"attributes\": {\n                  \"content\": \"Comment 1 content\",\n                  \"email\": \"john@doe.com\"\n              },\n              \"links\": {\n                  \"self\": \"http://link-to-comment/1\"\n              },\n              \"relationships\": {}\n          },\n          {\n              \"type\": \"comment\",\n              \"id\": \"22208770-76dd-47e5-a1c4-4d0d9c2483ab\",\n              \"attributes\": {\n                  \"content\": \"Comment 2 content\",\n                  \"email\": \"john@doe.com\"\n              },\n              \"links\": {\n                  \"self\": \"http://link-to-comment/2\"\n              },\n              \"relationships\": {}\n          },\n          {\n              \"type\": \"comment\",\n              \"id\": \"cb0759b0-03ab-4291-b067-84a9017fea6f\",\n              \"attributes\": {\n                  \"content\": \"Comment 3 content\",\n                  \"email\": \"john@doe.com\"\n              },\n              \"links\": {\n                  \"self\": \"http://link-to-comment/3\"\n              },\n              \"relationships\": {}\n          }\n      ]\n  }\n  ```\n\n  Will be deserialized in a map like this one:\n\n  ```\n  [\n    %{\n      \"__metadata\" =\u003e %{\n        \"links\" =\u003e %{\"self\" =\u003e \"http://link-to-post/1\"},\n        \"type\" =\u003e \"posts\"\n      },\n      \"comments\" =\u003e [\n        %{\n          \"__metadata\" =\u003e %{\n            \"links\" =\u003e %{\"self\" =\u003e \"http://link-to-comment/2\"},\n            \"type\" =\u003e \"comment\"\n          },\n          \"content\" =\u003e \"Comment 2 content\",\n          \"email\" =\u003e \"john@doe.com\",\n          \"id\" =\u003e \"22208770-76dd-47e5-a1c4-4d0d9c2483ab\"\n        },\n        %{\n          \"__metadata\" =\u003e %{\n            \"links\" =\u003e %{\"self\" =\u003e \"http://link-to-comment/3\"},\n            \"type\" =\u003e \"comment\"\n          },\n          \"content\" =\u003e \"Comment 3 content\",\n          \"email\" =\u003e \"john@doe.com\",\n          \"id\" =\u003e \"cb0759b0-03ab-4291-b067-84a9017fea6f\"\n        }\n      ],\n      \"content\" =\u003e \"First post content\",\n      \"creator\" =\u003e %{\n        \"__metadata\" =\u003e %{\n          \"links\" =\u003e %{\"self\" =\u003e \"http://link-to-creator/1\"},\n          \"type\" =\u003e \"creators\"\n        },\n        \"firstname\" =\u003e \"John\",\n        \"id\" =\u003e \"22208770-76dd-47e5-a1c4-4d0d9c2483ad\",\n        \"lastname\" =\u003e \"Doe\"\n      },\n      \"id\" =\u003e \"13608770-76dd-47e5-a1c4-4d0d9c2483ad\",\n      \"title\" =\u003e \"First post\"\n    },\n    %{\n      \"__metadata\" =\u003e %{\n        \"links\" =\u003e %{\"self\" =\u003e \"http://link-to-post/2\"},\n        \"type\" =\u003e \"posts\"\n      },\n      \"comments\" =\u003e [\n        %{\n          \"__metadata\" =\u003e %{\n            \"links\" =\u003e %{\"self\" =\u003e \"http://link-to-comment/1\"},\n            \"type\" =\u003e \"comment\"\n          },\n          \"content\" =\u003e \"Comment 1 content\",\n          \"email\" =\u003e \"john@doe.com\",\n          \"id\" =\u003e \"22208770-76dd-47e5-a1c4-4d0d9c2483ac\"\n        }\n      ],\n      \"content\" =\u003e \"Second post content\",\n      \"creator\" =\u003e %{\n        \"__metadata\" =\u003e %{\n          \"links\" =\u003e %{\"self\" =\u003e \"http://link-to-creator/1\"},\n          \"type\" =\u003e \"creators\"\n        },\n        \"firstname\" =\u003e \"John\",\n        \"id\" =\u003e \"22208770-76dd-47e5-a1c4-4d0d9c2483ad\",\n        \"lastname\" =\u003e \"Doe\"\n      },\n      \"id\" =\u003e \"13608770-76dd-47e5-a1c4-4d0d9c2483ae\",\n      \"title\" =\u003e \"Second post\"\n    }\n  ]\n  ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabienhenon%2Fjsonapi-deserializer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabienhenon%2Fjsonapi-deserializer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabienhenon%2Fjsonapi-deserializer/lists"}