public void CallSerialize(ulong[] array) { if (array != null) { switch (array.Length) { case 0: CharStream.WriteJsonArray(); return; case 1: CharStream.Write('['); CallSerialize(array[0]); CharStream.Write(']'); return; default: bool isNext = false; CharStream.Write('['); foreach (ulong value in array) { if (isNext) { CharStream.Write(','); } else { isNext = true; } CallSerialize(value); } CharStream.Write(']'); return; } } CharStream.WriteJsonNull(); }