Open codyrehm opened 4 years ago
a question for the avro repo :-)
note: with v1.4-RC4, we've added support for protobuf and JSON serialization formats. At this stage, we've only added 'specific' serdes, not generic, but in the case of JSON, it wouldn't be too hard to implement the latter (adapt our JSON deserializer).
Nested record is also a GenericRecord itself, so you can simply extract the data from the nested record:
var contact = (GenericRecord) cr.Message.Value["Contact"];
var postalCode = contact["PostalCode"];
var city = contact["City"];
When reading a generic record using something like Consumer<int, GenericRecord>(), if there is a nested record as one of fields on the top-level generic record there does not appear to be any way to get at the values of the fields on the nested record?
i.e. generic record { ... fields: [ "nestedRecord": { "someField": "someValue" } ... ] ... } I dont see a way to get at the value of nestedRecord.someField.