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); }
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); }
//--------------------------------------------------------------------------------- // 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); }
public JSONInStream Start(int idx) { JSONObjectFieldValue fieldValue = (JSONObjectFieldValue)node.GetField(idx); fieldValue.value.parent = node; node = fieldValue.value; return(this); }
//--------------------------------------------------------------------------------- // Start //--------------------------------------------------------------------------------- public JSONInStream Start(string tag) { JSONObjectFieldValue fieldValue = (JSONObjectFieldValue)node.GetField(tag); fieldValue.value.parent = node; node = fieldValue.value; return(this); }
//--------------------------------------------------------------------------------- // 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); }
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); } }
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); }