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