
json_serializable.dart
Generates utilities to aid in serializing to/from JSON.
AI 简介
json_serializable 是一个 Dart 语言的代码生成库,用于自动生成 JSON 序列化与反序列化(toJSON/fromJson)方法。它基于注解(@JsonSerializable)和构建系统(build_runner),在编译期生成类型安全的序列化逻辑,避免手写样板代码。核心特点包括:支持嵌套对象、泛型、枚举、日期格式定制、空值处理及与 json_annotation 协同工作。适用于 Flutter 和 Dart 后端项目中需要频繁进行 JSON 数据交换的场景,如 API 请求响应解析、本地数据持久化等。
Dart
BSD 3-Clause "New" or "Revised" License1.6k
Stars
457
Forks
33
Watchers
138
Issues
Star 增长
今日0
近 7 天0
近 30 天+3
综合评分56.28
默认分支master