{"id":23298780,"url":"https://github.com/hokamc/otter_json","last_synced_at":"2026-04-19T06:40:13.519Z","repository":{"id":56836197,"uuid":"316941584","full_name":"hokamc/otter_json","owner":"hokamc","description":"A compile safe JSON serialization in generic way","archived":false,"fork":false,"pushed_at":"2022-02-05T06:21:39.000Z","size":130,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T16:09:35.794Z","etag":null,"topics":["compile-safe","dart","flutter","json","serialization"],"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/hokamc.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":"2020-11-29T12:01:17.000Z","updated_at":"2023-12-21T09:44:10.000Z","dependencies_parsed_at":"2022-09-07T07:10:50.351Z","dependency_job_id":null,"html_url":"https://github.com/hokamc/otter_json","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hokamc/otter_json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokamc%2Fotter_json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokamc%2Fotter_json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokamc%2Fotter_json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokamc%2Fotter_json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hokamc","download_url":"https://codeload.github.com/hokamc/otter_json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokamc%2Fotter_json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019553,"owners_count":26086749,"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-14T02:00:06.444Z","response_time":60,"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":["compile-safe","dart","flutter","json","serialization"],"created_at":"2024-12-20T08:12:37.615Z","updated_at":"2025-10-14T16:09:36.167Z","avatar_url":"https://github.com/hokamc.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"./icon.png\"  width=\"200\" alt=\"Otter JSON\"\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eOtter JSON\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)]()\n[![Status](https://img.shields.io/badge/status-active-success.svg)]()\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e \nJSON serialization with code generation.\n\u003cbr\u003e\u003c/p\u003e\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Why use it](#why-use-it)\n- [How to](#how-to)\n- [Todo](#todo)\n- [Link](#link)\n- [Authors](#authors)\n\n## Why use it\n\nDo you suffer from json_serializable? All generated code and 'part' make your source code messy. With Otter JSON, keep everything simple and clean.\n\n## Features\n\n- Generated code and source code are separated\n- Easy to register new serializer\n- Support all primitives\n- Support flutter common class\n- Support List\u003cT\u003e, Set\u003cT\u003e, Map\u003cString, T\u003e\n- Support nested object\n\n## How to\n\n- dependencies\n```yaml\ndependencies:\n  otter_json:\n\ndev_dependencies:\n  build_runner:\n  otter_json_generator:\n```\n\n- annotate\n```dart\n@JSON\nclass Person {\n  String firstName;\n  String lastName;\n}\n```\n\n- generate\n```shell script\nflutter pub run build_runner build\n```\n\n- register\n```dart\nOtter.module(GeneratedJsonModule());\n```\n\n- toJson, fromJson\n```dart\nMap\u003cString, dynamic\u003e map = Otter.toJson(Person());\nPerson person = Otter.fromJson({});\n```\n\n- custom serializer\n```dart\nclass ColorSerializer implements JsonSerializer\u003cColor, int\u003e {\n  @override\n  Color decode(int output) {\n    return Color(output);\n  }\n\n  @override\n  int encode(Color input) {\n    return input.value;\n  }\n}\n\nOtter.serializer(ColorSerializer());\n```\n\n## Todo\n\n## Link\n\n[otter_json](https://pub.dev/packages/otter_json)\n\n[otter_json_generator](https://pub.dev/packages/otter_json_generator)\n\n## Authors\n\n- [@hokamc](https://github.com/hokamc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhokamc%2Fotter_json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhokamc%2Fotter_json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhokamc%2Fotter_json/lists"}