title: Flag to ignore serialization of property build_runner
body: <p>Is there a way to ignore the serialization of a property within a JsonSerializable class?</p>
  
  <p>I'm using build_runner to generate the mapping code.</p>
  
  <p>One way to achieve this is by commenting the mapping for that specific property within the .g.dart-file though it would be great if an ignore attribute could be added on the property.</p>
  
  <pre><code>import 'package:json_annotation/json_annotation.dart';
  
  part 'example.g.dart';
  
  @JsonSerializable()
  class Example {
    Example({this.a, this.b, this.c,});
  
    int a;
    int b;
  
    /// Ignore this property
    int c;
  
    factory Example.fromJson(Map&lt;String, dynamic&gt; json) =&gt;
        _$ExampleFromJson(json);
  
    Map&lt;String, dynamic&gt; toJson() =&gt; _$ExampleToJson(this);
  }
  </code></pre>
  
  <p>Which results in</p>
  
  <pre><code>Example _$ExampleFromJson(Map&lt;String, dynamic&gt; json) {
    return Example(a: json['a'] as int, b: json['b'] as int, c: json['c'] as int);
  }
  
  Map&lt;String, dynamic&gt; _$ExampleToJson(Example instance) =&gt;
      &lt;String, dynamic&gt;{'a': instance.a, 'b': instance.b, 'c': instance.c};
  </code></pre>
  
  <p>What I do to achieve this is by commenting the mapping of c.</p>
  
  <pre><code>Example _$ExampleFromJson(Map&lt;String, dynamic&gt; json) {
    return Example(a: json['a'] as int, b: json['b'] as int, c: json['c'] as int);
  }
  
  Map&lt;String, dynamic&gt; _$ExampleToJson(Example instance) =&gt;
      &lt;String, dynamic&gt;{'a': instance.a, 'b': instance.b, /* 'c': instance.c */};
  </code></pre>