Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributejson2model

Generates Dart model classes from JSON strings via command line

pub.devRemove
json_serializable

Automatically generate code for converting Dart classes to and from JSON.

pub.devRemove
ScoresHealth6994 (best)
Maintenance94 (best)91
Quality100100
Popularity1193 (best)
Community41100 (best)
Compatibility8585
UsageDownloads (30 days)9504.5M (best)
Likes64k (best)
Pub points160 / 160160 / 160
GitHub stars51.6k (best)
MaintenanceLatest release1.1.4, 12 days ago (best)6.15.2, 4 weeks ago
Major versions in 12 months00
Contributors151 (best)
Publishervenshine.cngoogle.dev
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyNoNo
KindPure DartPure Dart
Code generationNoYes
Direct dependencies1 (best)12
LicenseBSD-3-CLAUSEBSD-3-CLAUSE
Setup effortLowLow
JudgementStrengths
  • Supports null safety and optional fields
  • Generates toJson/fromJson automatically
  • Handles non‑identifier keys and integer values for double fields
  • Command‑line tool is easy to use
  • Eliminates boilerplate for JSON parsing and serialization
  • Supports custom type converters, enums, and JSON Schema generation
Weaknesses
  • Only a command‑line tool, not integrated with build_runner
  • No support for runtime JSON parsing
  • Requires manual regeneration when JSON changes
  • Requires running a code generator (build_runner) during development
  • Generated files add to your source tree and require regeneration on model changes
WarningsNoneNone
json2model vs json_serializable: which Flutter package should you use? | pubscout