Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributedart_json_mapper

Annotate Dart objects to serialize and deserialize them from and to JSON.

pub.devRemove
json_annotation

Provides annotations for json_serializable to generate JSON (de)serialization code.

pub.devRemove
ScoresHealth5784 (best)
Maintenance1270 (best)
Quality91 (best)81
Popularity4997 (best)
Community6980 (best)
Compatibility100100
UsageDownloads (30 days)2k16M (best)
Likes2791.3k (best)
Pub points140 / 160150 / 160 (best)
GitHub stars3951.6k (best)
MaintenanceLatest release2.2.20, a year ago4.12.0, 6 months ago (best)
Major versions in 12 months00
Contributors651 (best)
Publisheredensapple.comgoogle.dev
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationYesNo
Direct dependencies91 (best)
LicenseBSD-3-CLAUSEBSD-3-CLAUSE
Setup effortMediumLow
JudgementStrengths
  • Keeps model classes clean with no boilerplate serialization methods inside them.
  • Rich out-of-the-box features like polymorphism, object cloning, and case style conversion.
  • Generates a single centralized mapper file for the whole project.
  • Small, zero‑runtime‑overhead package.
  • Works with Dart 3 and newer SDKs.
  • Provides fine‑grained control via JsonKey options.
Weaknesses
  • Requires running a code generator (`build_runner`) whenever model classes change.
  • Less common choice in the Dart ecosystem compared to `json_serializable`.
  • Requires a separate code‑gen step with build_runner and json_serializable.
  • Only useful when paired with a generator; on its own it does nothing.
WarningsNoneNone
dart_json_mapper vs json_annotation: which Flutter package should you use? | pubscout