public static bool AddItem(string key, Dictionary <string, object> data, out string error)
        {
            bool result = true;

            error = "";

            if (IsItemNameValid(key, out error) && SchemaExistsForItem(key, data))
            {
                result = AllItems.TryAddValue(key, data);
            }
            else
            {
                result = false;
            }

            if (result)
            {
                AddItemToListBySchema(key, GetSchemaForItem(key));
                ItemsNeedSave = true;
            }

            return(result);
        }