Пример #1
0
        protected override void BeginWriteArray(string inKey)
        {
            m_Stack.Push(m_Current);
            JSON newObj = JSON.CreateArray();

            m_Current[inKey] = newObj;
            m_Current        = newObj;
        }
Пример #2
0
        public override JSON Export()
        {
            JSON baseExport = base.Export();
            JSON parameters = JSON.CreateArray();

            foreach (var paramInfo in Parameters)
            {
                JSON paramJSON = paramInfo.Export();
                parameters.Add(paramJSON);
            }
            baseExport["parameters"] = parameters;
            return(baseExport);
        }
Пример #3
0
        public JSON Export()
        {
            JSON root = JSON.CreateObject();

            JSON components = JSON.CreateArray();

            foreach (var componentInfo in m_Components.Values)
            {
                components.Add(componentInfo.Export());
            }

            JSON triggers = JSON.CreateArray();

            foreach (var triggerInfo in m_Triggers.Values)
            {
                triggers.Add(triggerInfo.Export());
            }

            JSON queries = JSON.CreateArray();

            foreach (var queryInfo in m_Queries.Values)
            {
                queries.Add(queryInfo.Export());
            }

            JSON actions = JSON.CreateArray();

            foreach (var actioninfo in m_Actions.Values)
            {
                actions.Add(actioninfo.Export());
            }

            JSON groups = JSON.CreateArray();

            foreach (var groupInfo in m_Groups.Values)
            {
                groups.Add(groupInfo.Export());
            }

            root["components"] = components;
            root["triggers"]   = triggers;
            root["queries"]    = queries;
            root["actions"]    = actions;
            root["groups"]     = groups;

            return(root);
        }
Пример #4
0
        public override JSON Export()
        {
            JSON json = base.Export();

            JSON fields = JSON.CreateArray();

            if (m_PersistFields != null)
            {
                foreach (var field in m_PersistFields.Values)
                {
                    fields.Add(field.Export());
                }
            }

            json["persistFields"] = fields;

            return(json);
        }