targeted encode with AutomergeEncoder "cleans up" too aggressively
heckj opened this issue · comments
Joseph Heck commented
The update with #54 causes a rather unfortunate side effect with the AutomergeEncoder
method encode<T: Encodable>(_ value: T, at path: [CodingKey])
. The goal of this particular API is to allow a far more targeted encoding of values into an Automerge document, but the new cleanup removes keys and array elements around the pathing that isn't written.
The implementation behind this API should be updated to only clean up the portion of the Automerge document that matches elements from the path provided and lower within the document.