/// <summary> /// Fills the contents of a <seealso cref="JSON_Array.Value"/> /// </summary> /// <param name="arr">The <seealso cref="JSON_Array"/></param> /// <param name="json">The string being parsed</param> /// <param name="index">The starting index of <paramref name="json"/></param> /// <returns> /// The number of characters to trim from <paramref name="json"/> /// </returns> static int FillArray(JSON_Array arr, string json, int index) { int i = 0; char end_char = json[0]; if (end_char == ']') { return(1); } do { // The value could be any kind of JSON type // This is where the recursion sets in dynamic value = GetBase(json[0]); index = HandleBase(value, json); i += index; i += TrimString(ref json, index); arr.Value.Add(value); end_char = json[0]; ++i; // increment to match next line i += TrimString(ref json, 1); } while (end_char == ','); return(i); }
public void remove(JSON json) { JSON_Array.Remove(json); }
public void add(JSON json) { JSON_Array.Add(json); }
public List <JSON> .Enumerator GetEnumerator() { return(JSON_Array.GetEnumerator()); }