ocaml-protoc icon indicating copy to clipboard operation
ocaml-protoc copied to clipboard

Map field are not currently supported for JSON

Open vphantom opened this issue 2 years ago • 1 comments

I'm hitting this error in the gen_record functions of src/compilerlib/pb_codegen_encode_yojson.ml and src/compilerlib/pb_codegen_decode_yojson.ml.

It seems that maps in general, including of scalar types like map <string,string> aren't implemented for Yojson I/O yet.

vphantom avatar Jan 13 '22 14:01 vphantom

Yes this is the line that would need to provide the implementation for instance: https://github.com/mransan/ocaml-protoc/blob/b62a4d5d970533ce99f8c875c3522959ba56a569/src/compilerlib/pb_codegen_encode_yojson.ml#L209

mransan avatar Jan 17 '22 20:01 mransan