i am trying to consume a protobuf API over json and it uses
oneof
extensively. i originally built my data objects as just normal data classes with nullable fields representing the various oneof field options, but I’d really like to represent this with a sealed class. I started writing a custom decoder but I can’t figure out how to essentially “peek” and see which field is present so I know which serializer to use. anybody done this successfully?