Open Schwem opened 8 years ago
The GUID data type bcl.Guid
is a protobuf-net extension and not supported by the Google language spec, nor the protoc compiler. Can you rename this issue to something like "Add support for protobuf-net GUID values"?
One work around would be to modify (hand-edit) the field from "bcl.Guid" to "binary" and encode the binary as a string; e.g., "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". I am fairly certain that this would be wire-compatible with protobuf-net code, and should interoperate with no problem.
Otherwise, it will be some work to modify Froto to accept this: the parser currently uses a Parsec helper function to parse numeric values and I'm pretty sure that function cannot be taught to handle GUID/UUID format. So, that means writing a complete numeric parser that also can consume GUID's.
Can you just use the work-around, instead?
Thanks jhugard for your quick response. We created a little parser only for our necessary types now.
So, should I close it or leave it open as new Task?
Go ahead and leave it open.
I managed to decode a DateTime and a Guid from Protobuf.net. If anyone is interested I could try and convert the code to fit Froto.
The following
.proto
(created with protobuf-net)crashes with this message:
I try to parse it like this:
FSharpList<Ast.PStatement> s = Parse.fromString(proto);