You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #677 a wrapper for google.protobuf.Any was added. I wanted to use this because it would be very convenient when working with protobuf.Any, but it did not work. Here is an example based on the unit test comp_google_protobuf_any.js what I would like to do:
foo = Foo.fromObject({
foo: {
"@type": ".Bar",
bar: "a"
}
});
test.ok(foo.foo instanceof Bar.ctor, "should unwrap wrapped Bar in fromObject");
// Encode and decode again -> foo.foo is not serialized!
var foo2 = Foo.decode(Foo.encode(foo).finish());
obj = foo2.toObject(foo2, { json: true });
// This fails
test.same(obj.foo, { "@type": ".Bar", bar: "a" }, "this does not work at the moment");
Or is there any other way how I can initialize a message that contains a google.protobuf.Any easily?
The text was updated successfully, but these errors were encountered:
In #677 a wrapper for google.protobuf.Any was added. I wanted to use this because it would be very convenient when working with protobuf.Any, but it did not work. Here is an example based on the unit test comp_google_protobuf_any.js what I would like to do:
Or is there any other way how I can initialize a message that contains a google.protobuf.Any easily?
The text was updated successfully, but these errors were encountered: