public void Add (JsonValue item)
{
- if (item == null)
- throw new ArgumentNullException ("item");
-
list.Add (item);
}
throw new ArgumentNullException ("stream");
stream.WriteByte ((byte) '[');
for (int i = 0; i < list.Count; i++) {
- list [i].Save (stream);
+ JsonValue v = list [i];
+ if (v != null)
+ v.Save (stream);
+ else {
+ stream.WriteByte ((byte) 'n');
+ stream.WriteByte ((byte) 'u');
+ stream.WriteByte ((byte) 'l');
+ stream.WriteByte ((byte) 'l');
+ }
+
if (i < Count - 1) {
stream.WriteByte ((byte) ',');
stream.WriteByte ((byte) ' ');