On 6 May 2015 at 06:29, rhlake <rhl...@comcast.net> wrote:

> I have the following message definition in a proto file which is causing a 
> *serialization
> error*:
>
>
> message   Request {
>
>          repeated          LanguageType              LanguageList = 1;
> }
>
>
> enum     LanguageType   {
>
>               English = 0;
>               German = 1;
>               Spanish = 2;
> }
>
>
> *If I make the following change:*
>
>
> message   Request {
>
>          repeated          LanguageTypeList              LanguageListParam
> = 1;
> }
>
>
> message   LanguageTypeList  {
>
>          optional         LanguageType              LanguageList = 1;
> }
>
> enum     LanguageType   {
>
>               English = 0;
>               German = 1;
>               Spanish = 2;
> }
>
>
> can anyone explain what is happening?  does *repeated* *NOT WORK* with*
> enums*?
>

Repeated does work with enums.

Can you give a bit more context, e.g. what is the language you are creating
code for, and what exactly does the "serialization error" manifest (error
message or error code).

How do you serialize and deserialize the data ? A common problem is to not
deal with NUL bytes properly in the stream, i.e. if you interpret something
as a NUL-terminated C-string somewhere in the process it might look like a
too short buffer.

-h

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to