79826205

Date: 2025-11-21 06:47:54
Score: 1.5
Natty:
Report link

This looks like returning a list of contacts. In that case you might have some base Contact class that has a reference number as sole property. There are 2 subtypes: Company and Person, having their own properties. entity_type is used as the discriminator and tells the json deserializer which class is to be constructed. So yes, this is normal.

In a way, this is not that different than writing a single flat object with all possible fields and just omitting the ones that have no / a null value.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Martijn Stalenhoef