How would you implement a function that performs a deep copy of a JSON-serializable value?

Technical