Inheritance: JSONNode, IEnumerable
        public static void SendSetDefinesToConsulo(string uuid)
        {
            UnityUtil.RunInMainThread(() =>
            {
                if(!ConsuloIntegration.UseConsulo())
                {
                    return;
                }

                string projectPath = Path.GetDirectoryName(Application.dataPath);
                projectPath = projectPath.Replace('\\', '/');

                JSONClass result = new JSONClass();
                result.Add("projectPath", projectPath);
                if(uuid != null)
                {
                    result.Add("uuid", uuid);
                }
                JSONArray array = new JSONArray();
                foreach (string define in EditorUserBuildSettings.activeScriptCompilationDefines)
                {
                    array.Add(define);
                }

                result.Add("defines", array);

                ConsuloIntegration.SendToConsulo("unitySetDefines", result);
            });
        }
 public override void Add(JSONNode aItem)
 {
     var tmp = new JSONArray();
     tmp.Add(aItem);
     Set(tmp);
 }
        public static JSONNode Deserialize(System.IO.BinaryReader aReader)
        {
            JSONBinaryTag type = (JSONBinaryTag)aReader.ReadByte();
            switch(type)
            {
                case JSONBinaryTag.Array:
                {
                    int count = aReader.ReadInt32();
                    JSONArray tmp = new JSONArray();
                    for(int i = 0; i < count; i++)
                        tmp.Add(Deserialize(aReader));
                    return tmp;
                }
                case JSONBinaryTag.Class:
                {
                    int count = aReader.ReadInt32();
                    JSONClass tmp = new JSONClass();
                    for(int i = 0; i < count; i++)
                    {
                        string key = aReader.ReadString();
                        var val = Deserialize(aReader);
                        tmp.Add(key, val);
                    }
                    return tmp;
                }
                case JSONBinaryTag.Value:
                {
                    return new JSONData(aReader.ReadString());
                }
                case JSONBinaryTag.IntValue:
                {
                    return new JSONData(aReader.ReadInt32());
                }
                case JSONBinaryTag.DoubleValue:
                {
                    return new JSONData(aReader.ReadDouble());
                }
                case JSONBinaryTag.BoolValue:
                {
                    return new JSONData(aReader.ReadBoolean());
                }
                case JSONBinaryTag.FloatValue:
                {
                    return new JSONData(aReader.ReadSingle());
                }

                default:
                {
                    throw new Exception("Error deserializing JSON. Unknown tag: " + type);
                }
            }
        }
 public override JSONNode this[int aIndex]
 {
     get
     {
         return new JSONLazyCreator(this);
     }
     set
     {
         var tmp = new JSONArray();
         tmp.Add(value);
         Set(tmp);
     }
 }