public TinyJsonInterface(Allocator allocator) { m_RootData = new TinyJsonData(allocator); Object = new TinyJsonObject { Type = JsonValueType.Object, m_Data = m_RootData }; }
TinyJsonObject(TinyJsonArray array) { this = default; Type = JsonValueType.Array; m_Data = array.m_Data; m_ArrayRefHandle = array.m_ArrayRefHandle; }
internal void DeepCopyFields(ref TinyJsonData source) { TinyJsonObject.CheckNotSameObject(source, this); foreach (var keyValue in source.m_RootObjMap) { var objectCopy = source.CreateObjectFromJsonHandle(keyValue.Value); // read from source AddOrUpdateField(keyValue.Key, objectCopy); // write to destination } }
internal void AddOrUpdateObject(FixedString128 key, ref TinyJsonData source) { var newObj = CreateObjectField(key); newObj.m_Data.DeepCopyFields(ref source); }