title: Serialize protobuf with default values using Gson
body: <p>I'm trying to serialize a protobuf message, which is represented as Java class, into JSON with Gson library and <a href="https://github.com/google/gson/blob/master/proto/src/main/java/com/google/gson/protobuf/ProtoTypeAdapter.java" rel="nofollow noreferrer">ProtoTypeAdapter</a></p>
  
  <pre class="lang-java prettyprint-override"><code>ProtoTypeAdapter adapter = ProtoTypeAdapter.newBuilder()
          .setFieldNameSerializationFormat(CaseFormat.LOWER_UNDERSCORE, CaseFormat.LOWER_UNDERSCORE)
          .build();
  Gson gson = new GsonBuilder()
          .registerTypeAdapter(SomeAutogeneratedClass.class, adapter)
          .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
          .disableHtmlEscaping()
          .create();
  
  suchMessage.getMyIntField()  // which is 0
  String serialized = gson.toJson(suchMessage)
  </code></pre>
  
  <p>But it seems that it does not serialize default values such as <code>0</code> for <code>int</code> field.
  How can I include those fields with default value in JSON?</p>