Skip to content

Commit

Permalink
json_annotation: prepare to release v4.9.0
Browse files Browse the repository at this point in the history
Fix some doc comments
  • Loading branch information
kevmoo committed Apr 24, 2024
1 parent dbe976a commit 886d940
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions json_annotation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## 4.9.0-wip
## 4.9.0

- Require Dart 3.0
- Added `JsonSerializable(createJsonKeys: true)`.
- Add `JsonSerializable(createJsonKeys: true)`.
([#1401](https://github.com/google/json_serializable.dart/pull/1401))

## 4.8.1
Expand Down
13 changes: 8 additions & 5 deletions json_annotation/lib/src/json_serializable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,19 @@ class JsonSerializable {
final bool? createFieldMap;

/// If `true` (defaults to false), a private class `_$ExampleJsonKeys`
/// constant is created in the generated part file.
/// class is created in the generated part file.
///
/// This class will contain every property, with the json key as value,
/// exposing a secured way to access the json key from the property.
/// This class will contain every property as a [String] field with the JSON
/// key as the value.
///
/// ```dart
/// @JsonSerializable(createJsonKeys: true)
/// class Example {
/// // ...
/// static const jsonKeys = _$PublicationImplJsonKeys();
/// @JsonKey(name: 'LAST_NAME')
/// String? firstName;
///
/// // Will have the value `LAST_NAME`
/// static const firstName = _$ExampleJsonKeys.firstName;
/// }
/// ```
final bool? createJsonKeys;
Expand Down
2 changes: 1 addition & 1 deletion json_annotation/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: json_annotation
version: 4.9.0-wip
version: 4.9.0
description: >-
Classes and helper functions that support JSON code generation via the
`json_serializable` package.
Expand Down
5 changes: 2 additions & 3 deletions json_serializable/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
## 6.8.0-wip

- Add type arguments to `Map` literals used for `Record` serialization.
- Added support for generating `ExampleJsonKeys`, exposing a secured way to
access the json keys from the properties.
([#1164](https://github.com/google/json_serializable.dart/pull/1164))
- Add support for `JsonSerializable(createJsonKeys: true)`.
([#1401](https://github.com/google/json_serializable.dart/pull/1401))
- Handle decoding an `int` value from a `double` literal.
This now matches the behavior of `double` values being encoded as `int`.

Expand Down

0 comments on commit 886d940

Please sign in to comment.