SmartDroidDeveloper / google-api-java-client

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

Extension of GenericData to support handling Protobufs #134

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
External references, such as a standards document, or specification:
http://code.google.com/apis/protocolbuffers/docs/overview.html

Java environments (e.g. Java 6, Android 2.3, App Engine 1.4.2, or All):
Java backends (i.e. Java, including appengine), anything likely to pass around 
protos,

Please describe the feature requested:
The GenericData concept is great, and provides a simple way to consume, handle, 
and feed out data in XML/Json formats. As protobuf usage increases as the way 
to pass messages in/out of Java binaries, it would be nice to provide a 
parser/serializer to support translation between protos and GenericData 
(GenericProto?)

I'm not sure how nicely protobufs support this sort of treatment, but at least 
a few of the ideas are the same, e.g.

class Person extends GenericProto {
  @Key
  String name;
  @Key
  long id;
  @Key
  Address address;
}

could be used to automatically load protobufs of the form:

message Address { ... }
message Person {
  required string name = 1;
  required int64 id = 2;
  optional Address address = 3;
}

Original issue reported on code.google.com by patcole...@google.com on 28 Feb 2011 at 10:37

GoogleCodeExporter commented 9 years ago
Moved to:
http://code.google.com/p/google-http-java-client/issues/detail?id=13

Original comment by yan...@google.com on 6 Jun 2011 at 1:30