README
This commit is contained in:
parent
e3ccf98b69
commit
328224fc10
1 changed files with 2 additions and 0 deletions
|
@ -161,6 +161,7 @@ tend to be snake_cased. This is not a problem, because we can define an alias
|
||||||
for a field.
|
for a field.
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
|
@serializable
|
||||||
abstract class _Spy extends Model {
|
abstract class _Spy extends Model {
|
||||||
/// Will show up as 'agency_id' in serialized JSON.
|
/// Will show up as 'agency_id' in serialized JSON.
|
||||||
///
|
///
|
||||||
|
@ -178,6 +179,7 @@ In pratice, there may keys that you want to exclude from JSON.
|
||||||
To accomplish this, simply annotate them with `@exclude`:
|
To accomplish this, simply annotate them with `@exclude`:
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
|
@serializable
|
||||||
abstract class _Whisper extends Model {
|
abstract class _Whisper extends Model {
|
||||||
/// Will never be serialized to JSON
|
/// Will never be serialized to JSON
|
||||||
@exclude
|
@exclude
|
||||||
|
|
Loading…
Reference in a new issue