public JSONListData Clone() { JSONListData clone = new JSONListData(new List <object>()); foreach (object obj in _rawDataList) { object val = obj; JSONDictData valDict = val as JSONDictData; if (valDict != null) { val = valDict.Clone(); } JSONListData valList = val as JSONListData; if (valList != null) { val = valList.Clone(); } clone._rawDataList.Add(val); } return(clone); }
public JSONDictData Clone() { JSONDictData clone = new JSONDictData(new Dictionary <string, object>()); foreach (string key in _rawDataDict.Keys) { object val = _rawDataDict[key]; JSONDictData valDict = val as JSONDictData; if (valDict != null) { val = valDict.Clone(); } JSONListData valList = val as JSONListData; if (valList != null) { val = valList.Clone(); } clone.SetValue(key, val); } return(clone); }