SmartDroidDeveloper / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

Don't specify @Key annotation value if JSON key matches field name #214

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
External references, such as a standards document, or specification?

N/A

Java environments (e.g. Java 6, Android 2.3, App Engine 1.4.2, or All)?

All

Please describe the feature requested.

We should investigate the impact on the compiled Java class files on the fact 
that currently the generated libraries specify the @Key annotation value, for 
example:

public final class Activity extends GenericJson {
  @Key("id")
  public String id;
}

Most of the time the field name matches the JSON key name, so it is unnecessary.

Original issue reported on code.google.com by yan...@google.com on 20 May 2011 at 12:46

GoogleCodeExporter commented 9 years ago
I tried this with the Tasks API.  It reduced the compiled jar size by 100 bytes 
on a 33.4KB jar.  So the impact is very small.

Original comment by yan...@google.com on 8 Nov 2011 at 9:45

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 15 Nov 2011 at 9:16

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 1 Feb 2012 at 9:51

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 1 Feb 2012 at 10:03