// Clone "this" iesJSON into a specified iesJSON object. // Make a clone/duplicate of "this" iesJSON (for all sub-items, make a copy of them as well down the entire tree) // NOTE! Clears the destination object first! public bool CloneTo(iesJSON toJSONobj, bool BuildValue=true,bool BuildString=true) { if (stats!=null) { IncStats("stat_CloneTo"); } if (toJSONobj==null) { return false; } try { toJSONobj.Clear(); // Make sure there is nothing in the destination object. toJSONobj.SerializeVoidJSON(this, BuildValue, BuildString); } catch {return false; } return true; }
// FUTURE: // Merge() // Make a clone/duplicate of "this" iesJSON (for all sub-items, make a copy of them as well down the entire tree) public iesJSON Clone(bool BuildValue=true,bool BuildString=true) { if (stats!=null) { IncStats("stat_Clone"); } iesJSON j=new iesJSON(); j.UseFlexJson=UseFlexJson; j.ALLOW_SINGLE_QUOTE_STRINGS=ALLOW_SINGLE_QUOTE_STRINGS; j.SerializeVoidJSON(this, BuildValue, BuildString); return j; }