I've also used the pattern:
  message Map {
    message Entry {
       optional string name = 1;
       optional string value = 2;
    }
    repeated Entry entries = 1;
  }

Alkis, do you see benefits or downsides between the two approaches?

To the second question, perhaps pick a universal representation for dates,
such as RFC 3339 (http://tools.ietf.org/html/rfc3339) and use a string?

-DeWitt

2009/8/26 rajesh <poorv...@gmail.com>

>
> -Thanks
>
> On Aug 26, 2:46 pm, Alkis Evlogimenos ('Αλκης Ευλογημένος)
> <evlogime...@gmail.com> wrote:
> > Protocol buffers do not have a protobuf map equivalent. What is usually
> done
> > is to put 2 repeated fields in the proto, one for the keys and one for
> the
> > values of the map you are trying to represent.
> >
> >
> >
> >
> >
> > On Wed, Aug 26, 2009 at 7:13 PM, rajesh <poorv...@gmail.com> wrote:
> >
> > > Hi All,
> > >          Iam kinda new to using protocol buffers, so this  could be a
> > > dumb question. I am curious as to how or what should be the syntax of
> > > the protocol buffer message for Map implementations in java. I looked
> > > in the documentation, but dint find any such example message.
> > > Similarly what should be the field type in the protocol buffer message
> > > which  corresponds to Date implemetations in java. I would appreciate
> > > if some one can guide me through this or point me to the documentation
> > > which will help me understand this aspect better. Thanks in advance.
> >
> > > -Raj
> >
> > --
> >
> > Alkis- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to