“Deep copy” is a code smell and attempts to implement it will lead to pernicious bugs. Either you’re copying data, in which case it should be serializable to and unseriazable from JSON, or you’re copying objects, in which case you should think about what you’re really trying to achieve. There is usually a better solution.