+Setting attribute values to undefined can save of storage and transmission costs, as the attribute names will not be encoded. However, this can complicate the semantics of clearing values, as you cannot communicate the intent to clear an attribute by settings its value to undefined before encoding it. Since attributes set to `null` are encoded, you can transmit the intent to clear an attribute by settings its value to `null` before encoding and transmitting the object to a remote store (though often at the cost of causing the attribute name to be stored).
0 commit comments