@@ -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`
262262version 4.10.0, sealed classes can be serialized to json unions and json unions
263263can be deserialized to sealed classes.
264264
265265To 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
269269default behavior by changing the corresponding fields in `build.yaml`. For
270270more 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
0 commit comments