On Thu, Apr 16, 2015 at 4:55 PM, Gianluca Borello <g.bore...@gmail.com>
wrote:

> On Thu, Apr 16, 2015 at 2:08 PM, Feng Xiao <xiaof...@google.com> wrote:
> >
> > It's either already working for Java, or only requires small tweaks for
> it
> > to work. Could you check if marking a field lazy makes any difference in
> > Java? If not please help file an issue on our github site.
> >
>
> Thanks for your reply, Feng.
>
> Actually, I already verified that it doesn't make a difference, but
> before filing an issue I wanted to check if it's expected or not:
> currently, we generate the protobufs from a C++ program, send them
> over the network and parse them with Java. Marking fields "lazy"
> doesn't make a difference in the generated C++ code, and I was
> wondering if the "lazy" information was included by chance in the wire
> protocol or not, because if it was, I guess it would be correct to see
> the lazy fields not working in Java despite being marked as such in
> the schema (because the C++ code didn't mark them as lazy).
>
Lazy does not affect the wire format. It doesn't even affect the generated
API. What happens should be that, when the Java side receives the data from
the C++ side, it will store lazy fields in a LazyField class where the data
is stored in an parsed form. The Java side learns whether a field is lazy
from the .proto file, not from the wire data.


>
> Thanks.
>

-- 
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