0

I have some JSON retrieved from a database that I cannot alter. I want to polymorphically deserialise based on a field in the object. I understand I can supply a custom name via the attribute [JsonPolymorphic(TypeDiscriminatorPropertyName = "$discriminator")] but this complains as the field I want to use is not the first of the object. Is my only option here a full custom converter or is there a simpler way to just specify the field I want when it's not the first?

SeeNoWeevil
  • 2,549
  • 4
  • 26
  • 39

0 Answers0