You also don't have to use proto at all. All you need is serializers and
deserializers to and from the Buffer type. Then you just need to create a
map of method names to method definition objects (
https://grpc.io/grpc/node/grpc.html#~MethodDefinition), and pass that to
grpc.makeGenericClientConstructor or server.addService, depending on
whether you need to use it on the client or server.

On Tue, Oct 3, 2017 at 4:24 PM 'Ken Payson' via grpc.io <
grpc-io@googlegroups.com> wrote:

> If you can serialize these object types to strings, and need to pack them
> into a protobuf message, you can put them in the protobuf as serialized
> strings.
>
>
> On Thursday, September 14, 2017 at 5:56:35 PM UTC-7, luc...@getsirena.com
> wrote:
>>
>> Hi! I'm trying to add support for 2 types that I need:
>>
>> - BSON.ObjectId (for MongoDB IDs)
>> - Unknown object structure
>>
>> For the first one, I was thinking on just a type that
>> serializes/deserializes the BSON.ObjectId to a string, it it may be sent as
>> a string.
>>
>> For the second one, as I need to pass objects where I don't know how
>> they're gonna be, I was thinking on serializing them to a JSON string, and
>> then deserialize it in the other side.
>>
>> Is any of this possible?
>>
>> If so, how do I start?
>>
>> Thanks!
>> Luciano
>>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grpc-io+unsubscr...@googlegroups.com.
> To post to this group, send email to grpc-io@googlegroups.com.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/908f10ff-999b-4244-91ca-2657bf0180a0%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/908f10ff-999b-4244-91ca-2657bf0180a0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAPK2-4d_xEhAO%3DEeo8jMac8uaSq4OhEi7%2BH7z4ok7HTi6uDqTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to