Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add DeepCopy method to JSONObject #148

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dwertent
Copy link

@dwertent dwertent commented Sep 6, 2024

The DeepCopy method is added to the JSONObject struct in order to create a deep copy of the object. This method recursively copies the map and slice elements of the object to ensure that the copied object is independent of the original. This is useful after encountering this issue that occurred because of a shallow copy.

This code should call cop.Input = op.Input.DeepCopy() once this code is published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant