Skip to content

Copying a json


Example on how to deep-copy a Json object.

C++:
Json json; // we want to clone this

Json myClone = json;

That's it.

You can also use the explicit method.

C++:
Json json; // we want to clone this

Json myClone;
myClone.CloneFrom(json);

That's it.