# json_serializable

> Generate JSON to and from code for annotated Dart classes

Source: https://talira.ai/catalog/json-serializable-3924m4hb
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / serialization](https://talira.ai/categories/libraries/serialization), [developer tools / code generation](https://talira.ai/categories/developer-tools/code-generation)
- Licence: BSD-3-Clause[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source.
- Free tier: yes[^1]
- Backed by: [Google](https://talira.ai/orgs/google.md)
- Funding: public company (NASDAQ:GOOGL)[^2]

json_serializable generates the code that converts [Dart](https://talira.ai/catalog/dart-3askvstd.md) and Flutter classes to and from JSON. You annotate a class with `@JsonSerializable` (from its companion package json_annotation), customize fields with `@JsonKey` and enums with `@JsonEnum`, and run [build_runner](https://talira.ai/catalog/build-runner-snjaeg1d.md) to write the `fromJson` and `toJson` functions into a generated part file. It can also generate a JSON Schema for a class, and `@JsonLiteral` embeds a JSON file's contents as a Dart field. It lives in Google's GitHub organization, under a licence from the Dart project authors.

## Links

- GitHub: https://github.com/google/json_serializable.dart
- Docs: https://pub.dev/packages/json_serializable

## Problems it solves

- stop hand-writing fromJson and toJson for my Flutter models
- parse API responses into typed Dart classes
- generate a JSON Schema from my Dart model classes
- map snake_case JSON keys to camelCase Dart fields

## Features

- @JsonSerializable code generation for fromJson and toJson
- @JsonKey field options
- @JsonEnum for enums
- JSON Schema generation
- @JsonLiteral to embed JSON files

## Trust

Overall: 0.58 out of 1.
Signals: maintenance 0.77, adoption 0.64, momentum 0.36, community 0.69, backing 0.55, extensibility 0.00.

- last commit 14 days ago
- 25 commits in the last 90 days
- latest release json_serializable-v6.15.2 34 days ago
- 1.6k GitHub stars
- 53 contributors
- backed by Google
- funding: public company (NASDAQ:GOOGL)

## Related

- Works with [Dart](https://talira.ai/catalog/dart-3askvstd.md)
- Works with [build_runner](https://talira.ai/catalog/build-runner-snjaeg1d.md)

## Sources

[^1]: https://github.com/google/json_serializable.dart/blob/master/json_serializable/LICENSE (checked 23 Nov 2026)
[^2]: https://www.sec.gov/files/company_tickers_exchange.json (checked 20 Nov 2026)
