The default type discriminator is type. We changes this since that would rule out a very likely scenario of users wanting to include a type fields in the objects they extend from CARP.
First, we used $type as the JSON type discriminator. This turned out to be a bit burdensome for MongoDB, since $ has a special meaning there.
Then, we changed it to __type, but now it turns out this is burdensome for Dart serialization since _ denotes private fields which don't get serialized (possibly by the specific serialization library used at DTU; did not dig into details).
Can we come up with something that is least likely to annoy infrastructure developers?
The default type discriminator is
type
. We changes this since that would rule out a very likely scenario of users wanting to include atype
fields in the objects they extend from CARP.First, we used
$type
as the JSON type discriminator. This turned out to be a bit burdensome for MongoDB, since$
has a special meaning there.Then, we changed it to
__type
, but now it turns out this is burdensome for Dart serialization since_
denotes private fields which don't get serialized (possibly by the specific serialization library used at DTU; did not dig into details).Can we come up with something that is least likely to annoy infrastructure developers?