Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Text.​Json.​Serialization.​ReferenceHandler
Assembly: System.Text.Json
Inheritance: object → ReferenceHandler
Defines how the <see cref="T:System.Text.Json.JsonSerializer" /> deals with references on serialization and deserialization.
Properties
public static
ReferenceHandler
IgnoreCycles
Gets an object that indicates whether an object is ignored when a reference cycle is detected during serialization.
public static
ReferenceHandler
Preserve
Gets an object that indicates whether metadata properties are honored when JSON objects and arrays are deserialized into reference types, and written when reference types are serialized. This is necessary to create round-trippable JSON from objects that contain cycles or duplicate references.
Methods
public
ReferenceResolver
CreateResolver​()
Returns the <see cref="T:System.Text.Json.Serialization.ReferenceResolver" /> used for each serialization call.
Returns The resolver to use for serialization and deserialization.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object