# System.Text.Json.Serialization

``` diff
 namespace System.Text.Json.Serialization {
     public enum JsonIgnoreCondition {
-        Always = 0,
+        Always = 1,
-        Never = 2,
+        Never = 0,
-        WhenNull = 1,

+        WhenWritingDefault = 2,
     }
+    public abstract class ReferenceHandler {
+        protected ReferenceHandler();
+        public static ReferenceHandler Preserve { get; }
+        public abstract ReferenceResolver CreateResolver();
+    }
+    public sealed class ReferenceHandler<T> : ReferenceHandler where T : ReferenceResolver, new() {
+        public ReferenceHandler();
+        public override ReferenceResolver CreateResolver();
+    }
-    public sealed class ReferenceHandling {
-        public static ReferenceHandling Default { get; }

-        public static ReferenceHandling Preserve { get; }

-    }
+    public abstract class ReferenceResolver {
+        protected ReferenceResolver();
+        public abstract void AddReference(string referenceId, object value);
+        public abstract string GetReference(object value, out bool alreadyExists);
+        public abstract object ResolveReference(string referenceId);
+    }
 }
```

