Closed vphantom closed 1 year ago
message Empty {}
also seems to omit the type from generated files with types, so support for empty protobuf messages is not really present in the library...
If I remember correctly, such empty messages become unit
when compiled. For json it's probably a bug, and a PR would be very helpful.
I believe https://github.com/mransan/ocaml-protoc/pull/198 should address this issue.
Hi! Thank you for your work. :smile: When compiling the use of an empty message, i.e.:
…I get a crash in Yojson mode:
Indeed, that's https://github.com/mransan/ocaml-protoc/blob/master/src/compilerlib/pb_codegen_decode_yojson.ml#L31
I know that the JSON representation should be an empty object (i.e.
`Assoc []
) but not to the point of knowing how to contribute this. 😕