Пример #1
0
    public JSONInStream List(string tag, Action <int, JSONInStream> callback)
    {
        JSONListFieldValue jSONListFieldValue = null;

        try
        {
            jSONListFieldValue = (JSONListFieldValue)node.GetField(tag);
        }
        catch (Exception ex)
        {
            Debug.LogError((object)ex);
            Debug.LogError((object)tag);
        }
        int num = 0;

        foreach (IJSONFieldValue item in jSONListFieldValue.value)
        {
            JSONNode     jSONNode     = new JSONNode(item);
            JSONInStream jSONInStream = new JSONInStream(jSONNode);
            try
            {
                JSONObjectFieldValue jSONObjectFieldValue = (JSONObjectFieldValue)item;
                if (jSONObjectFieldValue != null)
                {
                    jSONInStream = jSONInStream.Start(0);
                }
            }
            catch
            {
            }
            callback(num++, jSONInStream);
        }
        return(this);
    }
Пример #2
0
    public JSONInStream List(int idx, Action <int, JSONInStream> callback)
    {
        JSONListFieldValue fieldValue = (JSONListFieldValue)node.GetField(idx);
        int i = 0;

        foreach (IJSONFieldValue val in fieldValue.value)
        {
            JSONNode     n      = new JSONNode(val);
            JSONInStream stream = new JSONInStream(n);

            try
            {
                JSONObjectFieldValue valObject = (JSONObjectFieldValue)val;
                if (valObject != null)
                {
                    stream = stream.Start(0);
                }
            }
            catch (Exception e) {}


            callback(i++, stream);
        }
        return(this);
    }
Пример #3
0
    //---------------------------------------------------------------------------------
    // List
    //---------------------------------------------------------------------------------
    public JSONInStream List(string tag, Action <int, JSONInStream> callback)
    {
        JSONListFieldValue fieldValue = null;

        try{
            fieldValue = (JSONListFieldValue)node.GetField(tag);
        }
        catch (System.Exception e) {
            Debug.LogError(e);
            Debug.LogError(tag);
        }

        int i = 0;

        foreach (IJSONFieldValue val in fieldValue.value)
        {
            JSONNode     n      = new JSONNode(val);
            JSONInStream stream = new JSONInStream(n);

            try
            {
                JSONObjectFieldValue valObject = (JSONObjectFieldValue)val;
                if (valObject != null)
                {
                    stream = stream.Start(0);
                }
            }
            catch {}

            callback(i++, stream);
        }
        return(this);
    }
Пример #4
0
    public JSONInStream Start(int idx)
    {
        JSONObjectFieldValue fieldValue = (JSONObjectFieldValue)node.GetField(idx);

        fieldValue.value.parent = node;
        node = fieldValue.value;
        return(this);
    }
Пример #5
0
    //---------------------------------------------------------------------------------
    // Start
    //---------------------------------------------------------------------------------
    public JSONInStream Start(string tag)
    {
        JSONObjectFieldValue fieldValue = (JSONObjectFieldValue)node.GetField(tag);

        fieldValue.value.parent = node;
        node = fieldValue.value;
        return(this);
    }
Пример #6
0
 //---------------------------------------------------------------------------------
 // Start
 //---------------------------------------------------------------------------------
 public JSONInStream Start(string tag)
 {
     try{
         JSONObjectFieldValue fieldValue = (JSONObjectFieldValue)node.GetField(tag);
         fieldValue.value.parent = node;
         node = fieldValue.value;
     }
     catch (System.Exception e) {
         Debug.LogError(e);
         Debug.LogError(tag);
     }
     return(this);
 }
Пример #7
0
 public JSONInStream Start(string tag)
 {
     try
     {
         JSONObjectFieldValue jSONObjectFieldValue = (JSONObjectFieldValue)node.GetField(tag);
         jSONObjectFieldValue.value.parent = node;
         node = jSONObjectFieldValue.value;
         return(this);
     }
     catch (Exception ex)
     {
         Debug.LogError((object)ex);
         Debug.LogError((object)tag);
         return(this);
     }
 }
Пример #8
0
    public JSONInStream List(int idx, Action <int, JSONInStream> callback)
    {
        JSONListFieldValue jSONListFieldValue = (JSONListFieldValue)node.GetField(idx);
        int num = 0;

        foreach (IJSONFieldValue item in jSONListFieldValue.value)
        {
            JSONNode     jSONNode     = new JSONNode(item);
            JSONInStream jSONInStream = new JSONInStream(jSONNode);
            try
            {
                JSONObjectFieldValue jSONObjectFieldValue = (JSONObjectFieldValue)item;
                if (jSONObjectFieldValue != null)
                {
                    jSONInStream = jSONInStream.Start(0);
                }
            }
            catch
            {
            }
            callback(num++, jSONInStream);
        }
        return(this);
    }