{"id":18764095,"url":"https://github.com/oddbit/dart-json-delta","last_synced_at":"2026-04-12T07:33:46.816Z","repository":{"id":229593843,"uuid":"775839640","full_name":"oddbit/dart-json-delta","owner":"oddbit","description":"Dart extension for serializing and an object to a JSON delta.","archived":false,"fork":false,"pushed_at":"2024-03-25T10:28:18.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-02T00:09:32.796Z","etag":null,"topics":["dart","flutter","json","json-diff","json-serialization"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/json_delta","language":"Dart","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/oddbit.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-22T06:29:50.000Z","updated_at":"2024-12-15T07:16:55.000Z","dependencies_parsed_at":"2024-03-25T10:43:38.782Z","dependency_job_id":null,"html_url":"https://github.com/oddbit/dart-json-delta","commit_stats":null,"previous_names":["oddbit/dart-json-delta"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/oddbit/dart-json-delta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbit%2Fdart-json-delta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbit%2Fdart-json-delta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbit%2Fdart-json-delta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbit%2Fdart-json-delta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oddbit","download_url":"https://codeload.github.com/oddbit/dart-json-delta/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oddbit%2Fdart-json-delta/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006850,"owners_count":26084206,"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-10-11T02:00:06.511Z","response_time":55,"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","json-diff","json-serialization"],"created_at":"2024-11-07T18:28:41.784Z","updated_at":"2025-10-11T10:36:54.734Z","avatar_url":"https://github.com/oddbit.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"Introducing a mixin class that implements a `toJsonDelta()` method that serializes\nthe object to a JSON map of values of the changes in the object.\n\n## Usage\n\n```dart\nfinal person = Person(\"John\", \"Doe\", 30);\nperson.lastName = \"Smith\";\nperson.age = 31;\nfinal delta = person.toJsonDelta(); // {\"lastName\": \"Smith\", \"age\": 31}\n```\n\n\n### Implement in your models\nAn important note is that you call the `saveJsonDeltaState()` in the model's\nconstructor to set an initial state to compare against later.\n```dart\nclass Person extends JsonSerializable with JsonDelta {\n  String firstName;\n  String lastName;\n  int age;\n\n  Person({\n    required this.firstName,\n    required this.lastName,\n    required this.age,\n  }) {\n    // Save the initial state of your object in the constructor\n    saveJsonDeltaState();\n  }\n\n  @override\n  Map\u003cString, dynamic\u003e toJson() {\n    return {\n      'firstName': firstName,\n      'lastName': lastName,\n      'age': age,\n    };\n  }\n}\n```\n\n## Additional information\nThis package is compatible with [`json_serializable`](https://pub.dev/packages/json_serializable)\nwhich facilitates your generation of JSON.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foddbit%2Fdart-json-delta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foddbit%2Fdart-json-delta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foddbit%2Fdart-json-delta/lists"}