title: Custom JSON keys for appengine endpoint entities
body: <p>I've been searching for this for a while and am pretty sure I'm using the wrong terminology in my keywords. So here's an example to demonstrate what I want to do:</p>
  
  <p>I have an <code>Entity</code> defined as such</p>
  
  <pre><code>@Entity 
  public class DeviceRecord {
      @Id private    String id;
      private        String apikey;
      @Index private String description;
  }
  </code></pre>
  
  <p>When I use this in an <code>@ApiMethod</code> such as this</p>
  
  <pre><code>@ApiMethod
  public DeviceRecord login (final HttpServletRequest request, final String id) {
      return doSomethingThatGeneratesADeviceRecord(request, id);
  }
  </code></pre>
  
  <p>I get back the following JSON on the client:</p>
  
  <pre><code>{
    "id" : "did1234567",
    "apikey" : "apikey",
    "description" : "Bob"
  }
  </code></pre>
  
  <p>I want to use shorter keys to reduce the overhead and get something like below</p>
  
  <pre><code>{
    "id" : "did1234567",
    "ak" : "apikey",
    "dn" : "Bob"
  }
  </code></pre>
  
  <p>How do I go about annotating these fields so that they are deserialized with the custom keys and not the default field names?</p>
  
  <p>Thanks.</p>
  
  <p><strong>Update (Answer):</strong></p>
  
  <pre><code>@Entity 
  public class DeviceRecord {
      @Id @APIResourceProperty (name = "id" )    private String id;
      @APIResourceProperty (name = "ak" )        private String apikey;
      @Index @APIResourceProperty (name = "dn" ) private String description;
  }
  </code></pre>