edenman
06/05/2020, 1:56 AMoneof
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?edenman
06/05/2020, 1:57 AMedenman
06/05/2020, 1:58 AMdecode
apparently moves the index and thus subsequent calls for the other types failedenman
06/05/2020, 3:02 AMedenman
06/05/2020, 3:02 AMdecodeJson
method anymoreedenman
06/05/2020, 3:08 AMfromJson
now, wheeeeeedenman
06/05/2020, 3:19 AM