PackageTrack
Sign in Get early access

json_serializable

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

6.14.1 1000K downloads/mo #20 most downloaded on pub.dev google/json_serializable.dart

What this package is like to depend on

Last release 24 days ago

30 Jul 2026

Ships fairly regularly

a new release about every 6 weeks

Nearly every release is documented

notes for 118 of 119 stable releases

Nothing withdrawn

no release was ever pulled

9 years old

121 releases · first in 2017

10 releases in the last 12 months

see the full history below

Release timeline

121 releases · Jul 2017 to Jul 2026
2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 121
  1. 6.14.1 30 Jul 2026
    Release notes
    • Require analyzer: '>=10.0.0 <15.0.0'
    Open source →
    Release notes
    • Require analyzer: '>=10.0.0 <15.0.0'
    Open source →
  2. 6.14.0 15 May 2026
    Release notes
    • Support JsonKey.explicitJsonNullWhenNonNullField for PATCH-style tri-state
      JSON fields: distinguish omitted keys from explicit null in fromJson and
      emit explicit JSON null in toJson when the Dart field is non-null.
    • Require json_annotation: '>=4.12.0 <4.13.0'
    Open source →
    Release notes
    • Support JsonKey.explicitJsonNullWhenNonNullField for PATCH-style tri-state JSON fields: distinguish omitted keys from explicit null in fromJson and emit explicit JSON null in toJson when the Dart field is non-null.
    • Require json_annotation: '>=4.12.0 <4.13.0'
    Open source →
  3. 6.13.2 30 Apr 2026
    Release notes
    • Require analyzer: '>=10.0.0 <14.0.0'
    Open source →
    Release notes
    • Require analyzer: '>=10.0.0 <14.0.0'
    Open source →
  4. 6.13.1 20 Mar 2026
    Release notes
    • Improve error message when generating code for Record types with unsupported
      fields.
      (#1559)
    • Require analyzer: '>=10.0.0 <13.0.0'
    • Require build: ^4.0.4
    • Require dart_style: ^3.1.4
    • Require source_gen: ^4.1.2
    • Require source_helper: ^1.3.10
    Open source →
    Release notes
    • Improve error message when generating code for Record types with unsupported fields. (#1559)
    • Require analyzer: '>=10.0.0 <13.0.0'
    • Require build: ^4.0.4
    • Require dart_style: ^3.1.4
    • Require source_gen: ^4.1.2
    • Require source_helper: ^1.3.10
    Open source →
  5. 6.13.0 19 Feb 2026
    Release notes
    • Fix schema generation for many different types of fields.
      (#1549)
    • Support JsonSerializable.dateTimeUtc configuration option.
      (#1371)
    • Remove json_schema from dependencies (it is only used in tests).
    Open source →
    Release notes
    • Fix schema generation for many different types of fields. (#1549)
    • Support JsonSerializable.dateTimeUtc configuration option. (#1371)
    • Remove json_schema from dependencies (it is only used in tests).
    Open source →
  6. 6.12.0 29 Jan 2026
    Release notes
    • Support JsonKey annotation on constructor parameters.
    • Add support for JsonSerializable(createJsonSchema: true).
    Open source →
    Release notes
    • Support JsonKey annotation on constructor parameters.
    • Add support for JsonSerializable(createJsonSchema: true). (Huge thanks to Chris Sells for the PR!)
    Open source →
  7. 6.11.4 13 Jan 2026
    Release notes
    • Allow analyzer: >=9.0.0 <11.0.0
    Open source →
    Release notes
    • Allow analyzer: >=9.0.0 <11.0.0
    Open source →
  8. 6.11.3 20 Nov 2025
    Release notes
    • Require analyzer: ^9.0.0
    • Require build: ^4.0.3
    • Require build_config: ^1.2.0
    • Require dart_style: ^3.1.3
    • Require sdk: ^3.9.0
    • Require source_gen: ^4.1.1
    • Require source_helper: ^1.3.9
    Open source →
  9. 6.11.2 20 Nov 2025
    Release notes
    • Allow run_only_if_triggered to be specified in build.yaml to turn on the build_runner triggers heuristic.
    • Skip warning about annotations on both constructor and field if the values match.
    Open source →
  10. 6.11.1 05 Sep 2025
    Release notes
    • Allow build: '>=3.0.0 <5.0.0'.
    • Allow source_gen: '>=3.1.0 <5.0.0'.
    Open source →
  11. 6.11.0 26 Aug 2025
    Release notes
    • Support JsonKey annotation on constructor parameters.
    • Require analyzer: '>=7.4.0 <9.0.0'
    • Require dart_style: ^3.0.0
    • Require meta: ^1.15.0
    • Require source_helper: ^1.3.6
    • Require source_gen: ^3.1.0, stop using deprecated TypeChecker.fromRuntime and use the new TypeChecker.typeNamed instead.
    Open source →
  12. 6.10.0 17 Jul 2025
    Release notes
    • Required analyzer: ^7.4.0.
    • Switch to analyzer element2 model and build: ^3.0.0-dev.
    • Move package:collection to a dev dependency.
    • Use new null-aware element feature in generated code.
    • Require Dart 3.8
    Open source →
  13. 6.10.0-dev 10 Jul 2025 pre-release

    Nothing published for this version

  14. 6.9.5 17 Apr 2025
    Release notes
    • Support the analyzer: '>=6.9.0 <8.0.0'.
    • Fixed use of deprecated analyzer APIs.
    Open source →
  15. 6.9.4 12 Feb 2025
    Release notes
    • Fix extra line being generated when targeting Dart 3.7 package.
    Open source →
  16. 6.9.3 13 Jan 2025
    Release notes
    • Error out if the target package does not have a language version of 3.0 or greater.
    Open source →
  17. 6.9.2 17 Dec 2024
    Release notes
    • Support the latest package:analyzer.
    Open source →
  18. 6.9.1 17 Dec 2024
    Release notes
    • Support the latest package:source_gen.
    • Require Dart 3.6
    Open source →
  19. 6.9.0 19 Nov 2024
    Release notes
    • Use conditional map syntax to clean up null handling in toJson functions.
    • Fix core Dart type links in docs.
    • Require Dart 3.5
    Open source →
  20. 6.8.0 24 Apr 2024
    Release notes
    • Add type arguments to Map literals used for Record serialization.
    • Add support for JsonSerializable(createJsonKeys: true). (#1401)
    • Handle decoding an int value from a double literal. This now matches the behavior of double values being encoded as int.
    Open source →
  21. 6.7.1 30 Jun 2023
    Release notes
    • Support the latest package:analyzer.
    Open source →
  22. 6.7.0 16 May 2023
    Release notes
    • Support Record types.
    • Require Dart 3.0
    • Require analyzer: ^5.12.0
    Open source →
  23. 6.6.2 03 May 2023
    Release notes
    • Better handling of Object? or dynamic as fromJson constructor param.
    • Require Dart 2.19
    Open source →
  24. 6.6.1 01 Feb 2023
    Release notes
    • Fix bug when JsonKey.includeToJson is false.
    Open source →
  25. 6.6.0 19 Jan 2023
    Release notes
    • Support for JsonKey.includeFromJson and JsonKey.includeToJson.
    • Support JsonEnum.valueField being set with 'index'.
    • Support JsonSerializable.createPerFieldToJson.
    • Require Dart SDK >=2.18.0.
    • Require analyzer: ^5.2.0
    • Require json_annotation: '>=4.8.0 <4.9.0'
    Open source →
  26. 6.5.4 25 Oct 2022
    Release notes
    • Fixed handling of nullable fields with converters which return non-nullable values.
    Open source →
  27. 6.5.3 19 Oct 2022
    Release notes
    • Fixed handling of nullable enum fields with includeIfNull: false.
    Open source →
  28. 6.5.2 17 Oct 2022
    Release notes
    • Better handling of null when encoding enum values or values with conversions.
    Open source →
  29. 6.5.1 10 Oct 2022
    Release notes
    • Fixed BigInt, DateTime, and Uri support for JsonKey.defaultValue with a function value.
    Open source →
  30. 6.5.0 07 Oct 2022
    Release notes
    • Allow constructors to be passed to JsonKey parameters that support Function types.
    • Accept Function values for JsonKey.defaultValue. The provided Function will be invoked for the default value if the target JSON element is missing or null.
    Open source →
  31. 6.4.1 28 Sep 2022
    Release notes
    • Fixed a bug when an @JsonSerializable class uses a mixin with fields.
    • Added more documentation @JsonEnum.
    Open source →
  32. 6.4.0 21 Sep 2022
    Release notes
    • Add support for JsonEnum.valueField which allows specifying a field in an "enhanced enum" to use for serialization instead of specifying each value individually with `JsonValue
    • Require json_annotation: '>=4.7.0 <4.8.0'
    Open source →
  33. 6.3.2 13 Sep 2022
    Release notes
    • Require analyzer: '>=4.6.0 <6.0.0'
    • Require sdk: '>=2.17.0 <3.0.0'
    Open source →
  34. 6.3.1 08 Jul 2022
    Release notes
    • Fixed support for Duration fields with default values. (#1170)
    Open source →
  35. 6.3.0 07 Jul 2022
    Release notes
    • Added support for generating _$ExampleFieldMap, which can be used by other code-generators that needs to interact with JSON serialization. (#1164)
    • Added support for using a JsonConverter<MyClass, Object> on properties of type MyClass?. (#822)
    • Added support for JsonSerializable(converters: <JsonConverter>[]) (#1072)
    • Fix issue with serialization of non-nullable enumerations emitting a nullable type (#1146)
    Open source →
  36. 6.2.0 27 Apr 2022
    Release notes
    • Added support for the new FieldRename.screamingSnake field in package:json_annotation.
    Open source →
  37. 6.1.6 14 Apr 2022
    Release notes
    • Allow latest package:analyzer.
    Open source →
  38. 6.1.5 07 Mar 2022
    Release notes
    • Fix enum support for upcoming enhanced enums in Dart 2.17.
    Open source →
  39. 6.1.4 13 Jan 2022
    Release notes
    • Fix issues with latest package:analyzer related to enums and annotations.
    Open source →
  40. 6.1.3 17 Dec 2021
    Release notes
    • Allow latest package:analyzer.
    Open source →
  41. 6.1.2 16 Dec 2021
    Release notes
    • Fix issue with nested generics and genericArgumentFactories: true. (#1047)
    Open source →
  42. 6.1.1 02 Dec 2021
    Release notes
    • Fix JsonKey.readValue support to allow static functions.
    Open source →
  43. 6.1.0 01 Dec 2021
    Release notes
    • Support JsonKey.readValue to allow customized reading of values from source JSON map objects.
    • The check to make sure there is a correctly constrained dependency on package:json_annotation is now a warning and doesn't fail the build.
    • Require json_annotation '>=4.4.0 <4.5.0'.
    Open source →
  44. 6.0.1 22 Oct 2021
    Release notes
    • Don't require json_annotation in dependencies if it's just used in tests.
    Open source →
  45. 6.0.0 15 Oct 2021
    Release notes
    • Added support for JsonSerializable.constructor to allow specifying an alternative constructor to invoke when creating a fromJson helper.
    • Support the new @JsonEnum annotation in package:json_annotation.
    • Support JsonKey.nullForUndefinedEnumValue as a value for JsonKey.unknownEnumValue when you want to use null as the unknown value.
    • Use the new $enumDecodeNullable and $enumDecode in `json_annotation' instead of generating these for each library. NOTE: This is a potential breaking change if any user code relies on the previously generated private functions.
    • The builder now checks to make sure there is a correctly constrained dependency on package:json_annotation.
    • Require Dart SDK >=2.14.0.
    • Require json_annotation '>=4.3.0 <4.4.0'.
    Open source →
  46. 5.0.2 20 Sep 2021
    Release notes
    • Include type arguments when invoking fromJson on custom types. This fixes an edge case where the generic arguments could not be inferred.
    Open source →
  47. 5.0.1 15 Sep 2021
    Release notes
    • Correctly handle nullable custom objects within Iterable and Map.
    • Require the latest package:source_helper.
    Open source →
  48. 5.0.0 13 Jul 2021
    Release notes
    • Use the default value for optional constructor parameters if JsonKey.defaultValue is not provided. This could be a breaking behavior change in generated code in some cases.
    • Fixed fromJson for Map fields with nullable values.
    • Improve names of private classes generated for toJson and fromJson.
    • Use the new $checkedCreate helper exposed in package:json_annotation v4.1+.
    • Generated code now conforms to this prefer_expression_function_bodies lint.
    • Support default values and types with a fromJson constructor.
    • Support default values with class- and function-based converters.
    • type_helper.dart:
      • BREAKING: removed typeArgumentsOf. This is now an extension exposed by package:source_helper.
    • Require package:analyzer ^2.0.0.
    Open source →
  49. 4.1.4 13 Jul 2021
    Release notes
    • Allow the latest package:json_annotation.
    Open source →
  50. 4.1.3 26 May 2021
    Release notes
    • Correctly handle nullable types with type arguments in generated code.
    Open source →
  51. 4.1.2 14 May 2021
    Release notes
    • Correctly decode Map<String, double> when the input has int literals.
    Open source →
  52. 4.1.1 20 Apr 2021
    Release notes
    • Allow the latest package:build_config.
    Open source →
  53. 4.1.0 19 Mar 2021
    Release notes
    • Implementation is now null-safe.

    • Correctly handle nullable generic fields (T?) with genericArgumentFactories.

    • type_helper.dart - BREAKING changes

      • The API is now null-safe.
      • new KeyConfig class replaces JsonKey.
      • new ClassConfig class replaces JsonSerializable.
    Open source →
  54. 4.0.3 15 Mar 2021
    Release notes
    • Correctly handle nullable values with genericArgumentFactories.
    • Require the latest package:build.
    Open source →
  55. 4.0.2 01 Mar 2021
    Release notes
    • Correctly handle nullable Map and Iterable JSON types exposed by both class- and function-based converters.
    Open source →
  56. 4.0.1 18 Feb 2021
    Release notes
    • Allow latest package:analyzer.
    Open source →
  57. 4.0.0 12 Feb 2021
    Release notes
    • Requires Dart 2.12 or greater.
    • Generates null-safe code.
      • The nullable field on JsonKey ignored. The nullability of a field is now determined by the Dart type system.
    • BREAKING bool defaultProvided arg added to TypeHelper.deserialize. Only applies to code using TypeHelper directly.
    Open source →
  58. 4.0.0-nullsafety.0 09 Dec 2020 pre-release

    Nothing published for this version

  59. 3.5.2 06 Jan 2022
    Release notes
    • Widen package:analyzer range to allow v1.x.
    Open source →
  60. 3.5.1 02 Dec 2020
    Release notes
    • Improved error messages for unsupported types.
    • package:json_serializable/type_helper.dart
      • Made the third parameter to UnsupportedTypeError positional (optional).
    • Require package:analyzer >=0.39.0 <0.42.0.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive