{"id":17690184,"url":"https://github.com/onmyway133/json_resolve","last_synced_at":"2025-09-04T10:43:50.249Z","repository":{"id":53103527,"uuid":"180236511","full_name":"onmyway133/json_resolve","owner":"onmyway133","description":"🐰Easy resolving deep json using keypath in Dart","archived":false,"fork":false,"pushed_at":"2021-03-30T17:44:46.000Z","size":11,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T02:11:13.530Z","etag":null,"topics":["dart","flutter","json","keypath","resolve"],"latest_commit_sha":null,"homepage":"https://onmyway133.github.io/","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onmyway133.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-08T21:34:46.000Z","updated_at":"2023-09-08T17:52:30.000Z","dependencies_parsed_at":"2022-09-03T08:50:35.848Z","dependency_job_id":null,"html_url":"https://github.com/onmyway133/json_resolve","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/onmyway133/json_resolve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmyway133%2Fjson_resolve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmyway133%2Fjson_resolve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmyway133%2Fjson_resolve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmyway133%2Fjson_resolve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onmyway133","download_url":"https://codeload.github.com/onmyway133/json_resolve/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmyway133%2Fjson_resolve/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273595579,"owners_count":25134257,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","keypath","resolve"],"created_at":"2024-10-24T11:50:04.039Z","updated_at":"2025-09-04T10:43:50.120Z","avatar_url":"https://github.com/onmyway133.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json resolve\n\n❤️ Support my apps ❤️ \n\n- [Push Hero - pure Swift native macOS application to test push notifications](https://onmyway133.com/pushhero)\n- [PastePal - Pasteboard, note and shortcut manager](https://onmyway133.com/pastepal)\n- [Quick Check - smart todo manager](https://onmyway133.com/quickcheck)\n- [Alias - App and file shortcut manager](https://onmyway133.com/alias)\n- [My other apps](https://onmyway133.com/apps/)\n\n❤️❤️😇😍🤘❤️❤️\n\n- Available at https://pub.dartlang.org/packages/json_resolve\n- [How to resolve deep json object in Dart](https://dev.to/onmyway133/how-to-resolve-deep-json-object-in-dart-5c5l)\n\n## Description\njson_resolve is a Dart library that helps accessing property in deep json object easily using keypath\n\nGiven the following deeply nested json\n\n```json\n{\n    \"movie\": \"isFun\",\n    \"earth\": 199999,\n    \"dc\": [\n      {\n        \"name\": \"Superman\"\n      },\n      {\n        \"name\": \"Flash\"\n      },\n      {\n        \"name\": \"Wonder Woman\"\n      }\n    ],\n    \"marvel\": [\n      {\n        \"name\": \"Thor\",\n        \"weapon\": \"Mjolnir\",\n        \"appear\": [\n          {\n            \"year\": 2011,\n            \"title\": \"Thor\"\n          },\n          {\n            \"year\": 2013,\n            \"title\": \"The Dark World\"\n          },\n          {\n            \"year\": 2017,\n            \"title\": \"Ragnarok\"\n          }\n        ]\n      }\n    ]\n}\n```\n\nWe can access using keypath. The library ensures safe type checking and casting, and use provided default value as last resort\n\n```dart\nfinal String byProperty = resolve(json: json, path: \"movie\", defaultValue: \"error\");\nexpect(byProperty, \"isFun\");\n\nfinal int byInt = resolve(json: json, path: \"earth\", defaultValue: 0);\nexpect(byInt, 199999);\n\nfinal String byIndex = resolve(json: json, path: \"dc.2.name\", defaultValue: \"error\");\nexpect(byIndex, \"Wonder Woman\");\n\nfinal String byIndexThenProperty = resolve(json: json, path: \"marvel.0.appear.1.title\", defaultValue: \"error\");\nexpect(byIndexThenProperty, \"The Dark World\");\n```\n\n## Installation\nFirst of all add the following dependencies to your `pubspec.yaml`:\n\n```\ndependencies:\n  json_resolve: ^1.0.0\n```\n\n## Author\n\nKhoa Pham, onmyway133@gmail.com\n\n## License\n\n**json_resolve** is available under the MIT license. See the [LICENSE](https://github.com/onmyway133/json_resolve/blob/master/LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmyway133%2Fjson_resolve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonmyway133%2Fjson_resolve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmyway133%2Fjson_resolve/lists"}