8

I am trying to convert a ProtoBuf to Map by using the below mentioned code.

Map map = objectMapper.convertValue(obj, Map.class);

Sample PB data causing this: id: "1" metadata { type: "UNIT" isValidated: false status { status: ACTIVE } }

I am getting the error java.lang.IllegalArgumentException: Direct self-reference leading to cycle (through reference chain: com.sample.samplePB["unknownFields"]->com.google.protobuf.UnknownFieldSet["defaultInstanceForType"])

Rohith CM
  • 119
  • 6
  • Does this answer your question? [Convert a protobuf to JSON using Jackson?](https://stackoverflow.com/questions/51588778/convert-a-protobuf-to-json-using-jackson) – Praytic Sep 22 '21 at 15:10

0 Answers0