The ArrayProperty and MapProperty types have redundant property information wrapped around every value in the container. However, ArrayProperties only support one property type at a time, and the same can be said for MapProperty keys or MapProperty values. It is unnecessary and distracting to display this information in serde form.
I created #52 as a proof of concept to show what an optimized structure might look like, but the PR accomplishes this by writing custom ser+deserialization logic. Due to the nature of MapProperty, it is not practical to write code for all of the <K, V> property type combinations, so the approach in that PR will not scale well. I am currently thinking the best option may be to convert MapProperty to an enum, where the variants have various concrete property <K, V> types, resulting in a cleaner serde-serialized form. For example, this might look like:
The ArrayProperty and MapProperty types have redundant property information wrapped around every value in the container. However, ArrayProperties only support one property type at a time, and the same can be said for MapProperty keys or MapProperty values. It is unnecessary and distracting to display this information in serde form.
I created #52 as a proof of concept to show what an optimized structure might look like, but the PR accomplishes this by writing custom ser+deserialization logic. Due to the nature of MapProperty, it is not practical to write code for all of the <K, V> property type combinations, so the approach in that PR will not scale well. I am currently thinking the best option may be to convert MapProperty to an enum, where the variants have various concrete property
<K, V>
types, resulting in a cleaner serde-serialized form. For example, this might look like: