[serde] How to serialize structure with the descriptor

Hi Community!

For example, I have an arbitrary message and its descriptor. Some of the nested messages can be of well-known types (e.g, google.protobuf.Timestamp ). But the
So the JSON string should look like:

{"timestamp": "2019-10-12T07:20:50.52Z"}

deserialized debug representation

    data: {
      "nanos": Int32(520000000),
      "seconds": Int64(1570864850)

Some code in playground

I did a custom serialization for the wrapped message. But it was quite expensive for performance as I had to clone the value in the wrapped structure, messages can be nested in many levels.

For deserialization, e.g., I used DeserializeSeed and looks good in performance.

Thank you in advance!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.