Skip to content

Commit 2c7354d

Browse files
committed
fix: own review fixes
1 parent 30847d5 commit 2c7354d

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
@@ -255,14 +255,14 @@ customize the encoding/decoding of any type, you have a few options.
255255
256256
# Sealed classes
257257
258-
As of [`json_serializable`] version 6.10.0 and [`json_annotation`]
258+
As of `json_serializable` version 6.10.0 and `json_annotation`
259259
version 4.10.0, sealed classes can be serialized to json unions and json unions
260260
can be deserialized to sealed classes.
261261
262262
To achieve this, both the sealed class and its subclasses should be annotated
263-
with `JsonSerializable`. Only the sealed class should have `fromJson` factory
264-
and `toJson` functions. To customize the sealed class behavior, use the fields
265-
`unionRename` and `unionDiscriminator` in `JsonSerializable` or adjust the
263+
with [`JsonSerializable`]. Only the sealed class should have `fromJson` factory
264+
or `toJson` function. To customize the sealed class behavior, use the fields
265+
`unionRename` and `unionDiscriminator` in [`JsonSerializable`] or adjust the
266266
default behavior by changing the corresponding fields in `build.yaml`. For
267267
more complex examples, please see [example]:
268268
@@ -356,8 +356,6 @@ targets:
356356
[`Enum`]: https://api.dart.dev/dart-core/Enum-class.html
357357
[`int`]: https://api.dart.dev/dart-core/int-class.html
358358
[`Iterable`]: https://api.dart.dev/dart-core/Iterable-class.html
359-
[`json_annotation`]: https://unknown.com/package/json_annotation
360-
[`json_serializable`]: https://unknown.com/package/json_serializable
361359
[`JsonConverter`]: https://pub.dev/documentation/json_annotation/4.10.0/json_annotation/JsonConverter-class.html
362360
[`JsonEnum.valueField`]: https://pub.dev/documentation/json_annotation/4.10.0/json_annotation/JsonEnum/valueField.html
363361
[`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
@@ -278,7 +278,6 @@ _ => throw UnrecognizedUnionTypeException(
278278
/// )
279279
/// ]
280280
/// ```
281-
///
282281
List<String> _createDefaultFunctionBody(
283282
_ConstructorData data,
284283
List<String> checks,

json_serializable/test/integration/integration_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void main() {
8787
);
8888
});
8989

90-
test('ssube', () {
90+
test('simple', () {
9191
roundTripOrder(
9292
Order.custom(Category.top, <Item>[
9393
Item(24)
@@ -256,7 +256,7 @@ void main() {
256256
roundTripObject(p, Numbers.fromJson);
257257
}
258258

259-
test('ssube', () {
259+
test('simple', () {
260260
roundTripNumber(
261261
Numbers()
262262
..nums = [0, 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)