Trimatix/Carica

choose 'best' Union candidate instead of 'first'

Trimatix opened this issue · 0 comments

in order to overcome limiting dataclass field hints to a primative Unions, all types in the union are recursed over and the first successful deserialize is accepted.

Instead, all types in the union should be attempted, and the 'best match' selected. This could be quite slow, so perhaps parameterize this in carica configuration?