Skip to content
pubscout

Compare

The strongest value in each row is marked.

Attributeg_json

Convenient JSON access and manipulation with optional getters and setters

pub.devRemove
json_annotation

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

pub.devRemove
ScoresHealth4684 (best)
Maintenance270 (best)
Quality96 (best)81
Popularity2397 (best)
Community4180 (best)
Compatibility100100
UsageDownloads (30 days)1.2k16M (best)
Likes141.3k (best)
Pub points150 / 160150 / 160
GitHub stars61.6k (best)
MaintenanceLatest release4.1.1, 2 years ago4.12.0, 6 months ago (best)
Major versions in 12 months00
Contributors151 (best)
Publisherfaraday.icugoogle.dev
FitPlatformsAll (pure Dart)All (pure Dart)
WASM-readyYesYes
KindPure DartPure Dart
Code generationNoNo
Direct dependencies0 (best)1
LicenseMITBSD-3-CLAUSE
Setup effortLowLow
JudgementStrengths
  • Easy syntax for nested access
  • Optional getters that avoid exceptions
  • Supports setting values and pretty printing
  • No build_runner or code generation required
  • Small, zero‑runtime‑overhead package.
  • Works with Dart 3 and newer SDKs.
  • Provides fine‑grained control via JsonKey options.
Weaknesses
  • No compile-time type safety
  • Limited to dynamic JSON structures
  • Not suitable for complex data modeling
  • 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
g_json vs json_annotation: which Flutter package should you use? | pubscout