{"id":32293919,"url":"https://github.com/avdosev/normalizr_dart","last_synced_at":"2026-02-22T03:41:31.902Z","repository":{"id":61974038,"uuid":"461990384","full_name":"avdosev/normalizr_dart","owner":"avdosev","description":"A dart package for json normalization","archived":false,"fork":false,"pushed_at":"2022-02-27T11:40:37.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T03:43:14.288Z","etag":null,"topics":["dart","flutter","json","normalization","normalize","normalizr"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/avdosev.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}},"created_at":"2022-02-21T18:48:00.000Z","updated_at":"2024-02-05T11:17:35.000Z","dependencies_parsed_at":"2022-10-24T13:30:57.137Z","dependency_job_id":null,"html_url":"https://github.com/avdosev/normalizr_dart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/avdosev/normalizr_dart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdosev%2Fnormalizr_dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdosev%2Fnormalizr_dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdosev%2Fnormalizr_dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdosev%2Fnormalizr_dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avdosev","download_url":"https://codeload.github.com/avdosev/normalizr_dart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdosev%2Fnormalizr_dart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29704418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T03:17:42.375Z","status":"ssl_error","status_checked_at":"2026-02-22T03:17:31.622Z","response_time":110,"last_error":"SSL_read: 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":["dart","flutter","json","normalization","normalize","normalizr"],"created_at":"2025-10-23T03:37:42.884Z","updated_at":"2026-02-22T03:41:31.896Z","avatar_url":"https://github.com/avdosev.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# normalizr \u0026middot; ![build status](https://github.com/avdosev/normalizr_dart/workflows/unittests/badge.svg)\n\nSimple package for json normalization just like [normalizr](https://github.com/paularmstrong/normalizr).\n\n## About\n\nMany APIs, public or not, return JSON data that has deeply nested objects. Using data in this kind of structure is often very difficult. \n\nNormalizr is a small, but powerful utility for taking JSON with a schema definition and returning nested entities with their IDs, gathered in dictionaries.\n\n## Links\n\n[Pub dev][pubdev]\n\n[Documentation][docs]\n\n[Issue tracker][tracker]\n\n## Usage\n\nExample input json\n```json\n{\n  \"id\": \"123\",\n  \"author\": {\"id\": \"1\", \"name\": \"Paul\"},\n  \"title\": \"My awesome blog post\",\n  \"comments\": [\n    {\n      \"id\": \"324\",\n      \"commenter\": {\"id\": \"2\", \"name\": \"Nicole\"}\n    }\n  ]\n}\n```\nNormalize:\n```dart\nimport 'package:normalizr/normalizr.dart';\nimport 'dart:convert';\n\n// Define a users schema\nfinal user = Entity('users');\n\n// Define your comments schema\nfinal comment = Entity('comments', {\n  'commenter': Ref('users'),\n});\n\n// Define your article\nfinal article = Entity('articles', {\n  'author': Ref('users'),\n  'comments': Ref.list('comments'),\n});\n\nvoid main() {\n  // setup\n  normalizr.addAll([user, comment, article]);\n  \n  final data = ... // some json\n\n  // normalize json data\n  final normalizedData = normalize(data, article);\n  // output\n  final encoder = JsonEncoder.withIndent('  ');\n  String prettyJson = encoder.convert(normalizedData);\n  print(prettyJson);\n}\n```\noutput:\n```json\n{\n  \"result\": \"123\",\n  \"type\": \"articles\",\n  \"entities\": {\n    \"users\": {\n      \"1\": {\n        \"id\": \"1\",\n        \"name\": \"Paul\"\n      },\n      \"2\": {\n        \"id\": \"2\",\n        \"name\": \"Nicole\"\n      }\n    },\n    \"comments\": {\n      \"324\": {\n        \"id\": \"324\",\n        \"commenter\": \"2\"\n      }\n    },\n    \"articles\": {\n      \"123\": {\n        \"id\": \"123\",\n        \"author\": \"1\",\n        \"title\": \"My awesome blog post\",\n        \"comments\": [\n          \"324\"\n        ]\n      }\n    }\n  }\n}\n```\n\n## Features and bugs\n\nPlease file feature requests and bugs at the [issue tracker][tracker].\n\n[tracker]: https://github.com/avdosev/normalizr_dart/issues\n[pubdev]: https://pub.dev/packages/normalizr\n[docs]: https://pub.dev/documentation/normalizr/latest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favdosev%2Fnormalizr_dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favdosev%2Fnormalizr_dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favdosev%2Fnormalizr_dart/lists"}