private void SerializeUser(User user) { if (m_fileDataStore != null) { SerializedData data = new SerializedData { StoreID = UUID.Zero, Section = "Users", ContentType = "application/llsd+json", Name = user.ID.ToString(), Data = System.Text.Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(user.GetOSD())), Version = 1 }; m_fileDataStore.BeginSerialize(data); } }
private void SerializeInventory(UUID ownerID, Dictionary <UUID, InventoryBase> inventory) { if (m_fileDataStore != null) { OSDMap map = new OSDMap(inventory.Count); foreach (KeyValuePair <UUID, InventoryBase> kvp in inventory) { map[kvp.Key.ToString()] = SerializeInventoryNode(kvp.Value); } SerializedData data = new SerializedData { StoreID = UUID.Zero, Section = "Inventory", ContentType = "application/llsd+json", Name = ownerID.ToString(), Data = System.Text.Encoding.UTF8.GetBytes(OSDParser.SerializeJsonString(map)), Version = 1 }; m_fileDataStore.BeginSerialize(data); } }