Recommendations for best generated Protobuf/gRPC object mapping library
other
Good day all.
I have a giant static class right now full of conversions to/from gRPC classes. Finding over the course of development that it's been very tedious to update it. Looked into Mapperly first, but the fact that its derived type detection needs both source and target types to be assignable to/from their derived types is a bit of a pain (although I understand why).
For clarity's sake: * Supposing I have type
BaseType
BaseType
with 3 derived types
TypeOne
TypeOne
,
TypeTwo
TypeTwo
, and
TypeThree
TypeThree
, I'd like to be able to pass in protobuf generated type
ProtoT
ProtoT
to map to and from. * One other caveat is that within
ProtoT
ProtoT
,
BaseType
BaseType
's properties are nested inside a protobuf field of type
ProtoBaseT
ProtoBaseT
.
Are there any object mapping libraries that one reckons I could pull this off with? Reflection-based would be fine if there's no other option.