Skip to content

Commit d328cea

Browse files
committed
fix: own review fixes
1 parent fbbb160 commit d328cea

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

json_serializable/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,14 @@ customize the encoding/decoding of any type, you have a few options.
258258
259259
# Sealed classes
260260
261-
As of [`json_serializable`] version 6.10.0 and [`json_annotation`]
261+
As of `json_serializable` version 6.10.0 and `json_annotation`
262262
version 4.10.0, sealed classes can be serialized to json unions and json unions
263263
can be deserialized to sealed classes.
264264
265265
To achieve this, both the sealed class and its subclasses should be annotated
266-
with `JsonSerializable`. Only the sealed class should have `fromJson` factory
267-
and `toJson` functions. To customize the sealed class behavior, use the fields
268-
`unionRename` and `unionDiscriminator` in `JsonSerializable` or adjust the
266+
with [`JsonSerializable`]. Only the sealed class should have `fromJson` factory
267+
or `toJson` function. To customize the sealed class behavior, use the fields
268+
`unionRename` and `unionDiscriminator` in [`JsonSerializable`] or adjust the
269269
default behavior by changing the corresponding fields in `build.yaml`. For
270270
more complex examples, please see [example]:
271271
@@ -359,8 +359,6 @@ targets:
359359
[`Enum`]: https://api.dart.dev/dart-core/Enum-class.html
360360
[`int`]: https://api.dart.dev/dart-core/int-class.html
361361
[`Iterable`]: https://api.dart.dev/dart-core/Iterable-class.html
362-
[`json_annotation`]: https://unknown.com/package/json_annotation
363-
[`json_serializable`]: https://unknown.com/package/json_serializable
364362
[`JsonConverter`]: https://pub.dev/documentation/json_annotation/4.10.0/json_annotation/JsonConverter-class.html
365363
[`JsonEnum.valueField`]: https://pub.dev/documentation/json_annotation/4.10.0/json_annotation/JsonEnum/valueField.html
366364
[`JsonEnum`]: https://pub.dev/documentation/json_annotation/4.10.0/json_annotation/JsonEnum-class.html

json_serializable/lib/src/decode_helper.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ _ => throw UnrecognizedUnionTypeException(
295295
/// )
296296
/// ]
297297
/// ```
298-
///
299298
List<String> _createDefaultFunctionBody(
300299
_ConstructorData data,
301300
List<String> checks,

json_serializable/test/integration/integration_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void main() {
7070
..isRushed = false);
7171
});
7272

73-
test('ssube', () {
73+
test('simple', () {
7474
roundTripOrder(Order.custom(Category.top, <Item>[
7575
Item(24)
7676
..itemNumber = 42
@@ -239,7 +239,7 @@ void main() {
239239
roundTripObject(p, Numbers.fromJson);
240240
}
241241

242-
test('ssube', () {
242+
test('simple', () {
243243
roundTripNumber(Numbers()
244244
..nums = [0, 0.0]
245245
..doubles = [0.0]

json_serializable/tool/readme/readme_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ customize the encoding/decoding of any type, you have a few options.
123123

124124
# Sealed classes
125125

126-
As of `package:json_serializable` version 6.10.0 and `package:json_annotation`
126+
As of `json_serializable` version 6.10.0 and `json_annotation`
127127
version 4.10.0, sealed classes can be serialized to json unions and json unions
128128
can be deserialized to sealed classes.
129129

130130
To achieve this, both the sealed class and its subclasses should be annotated
131-
with `JsonSerializable`. Only the sealed class should have `fromJson` factory
131+
with `ja:JsonSerializable`. Only the sealed class should have `fromJson` factory
132132
or `toJson` function. To customize the sealed class behavior, use the fields
133-
`unionRename` and `unionDiscriminator` in `JsonSerializable` or adjust the
133+
`unionRename` and `unionDiscriminator` in `ja:JsonSerializable` or adjust the
134134
default behavior by changing the corresponding fields in `build.yaml`. For
135135
more complex examples, please see [example]:
136136

0 commit comments

Comments
 (0)