I'm trying to communicate my go app using goprotobuf with an existing c#
service that uses protobuf-net as serialization, but since there's no
decimal definition on protocol buffers, protobuf-net uses this
representation structure:
message Decimal {
optional uint64 lo = 1; // the first 64 bits of the underlying value
optional uint32 hi = 2; // the last 32 bis of the underlying value
optional uint32 signScale = 3; // the number of decimal digits (bits
1-16), and the sign (bit 0)
}
Go code:
val := math.Float64bits(3.74)
pd.Lo = proto.Uint64(0x400deb851eb851ec) // Using 3.74 Float64bits hexa
representation
pd.Hi = proto.Uint32(0x00000000)
pd.SignScale = proto.Uint32(0x000000020)
But, the C# server side doesn't get the 3.74 :(
Any help ?
Thanks !
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.