Protobuf repeated still produces a List<T> in it's generated Java companion
class.  I'm not aware of any way of representing this in either avro or
pbuf that wouldn't require you to iterate through some sequence stored at
that key.

On Sun, Jul 23, 2017 at 5:29 AM, kant kodali <[email protected]> wrote:

> Hi All,
>
> I was wondering if we can have duplicate fields in Avro? for example, If I
> have the following JSON {"city": "Toronto", "city": "Newyork"} and try to
> grab the key "city" I believe the JSON parser either throws error or
> returns "Newyork" but I don't think it will give me both "Toronto" and
> "Newyork" so I am wondering if this limitation is same in Avro or is Avro
> ok with duplicate fields?
>
> And yes I can express city as an array or whatever but thats not what I
> want There are cases for me where I really want to use the same key (may be
> something similar to protobuf repeated).
>
> Thanks!
>

Reply via email to