public void addData(JsonValue v_val) { JsonNil nilVal = v_val as JsonNil; if (nilVal == null || nilVal.IsPrint == true) { m_data.Add(v_val); } }
public virtual JsonValue GetJsonValue() { if (_isMiss) { JsonNil rtn = new JsonNil(); rtn.init(false); return(rtn); } if (_isNull) { JsonNil rtn = new JsonNil(); rtn.init(true); return(rtn); } return(_OnGetJsonValue()); }
//当添加相同键时,return false public bool addData(int v_ikey, JsonValue v_val, string v_note = null) { JsonNil nilVal = v_val as JsonNil; if (nilVal == null || nilVal.IsPrint == true) { if (!m_idata.ContainsKey(v_ikey)) { m_idata.Add(v_ikey, v_val); return(true); } else { m_idata[v_ikey] = v_val; return(false); } } return(true); }