Table of Contents

Interface IReferenceResolver

Namespace
Newtonsoft.Json.Serialization
Assembly
Newtonsoft.Json.dll

Used to resolve references when serializing and deserializing JSON by the JsonSerializer.

public interface IReferenceResolver

Methods

AddReference(object, string, object)

Adds a reference to the specified object.

void AddReference(object context, string reference, object value)

Parameters

context object

The serialization context.

reference string

The reference.

value object

The object to reference.

GetReference(object, object)

Gets the reference for the sepecified object.

string GetReference(object context, object value)

Parameters

context object

The serialization context.

value object

The object to get a reference for.

Returns

string

The reference to the object.

IsReferenced(object, object)

Determines whether the specified object is referenced.

bool IsReferenced(object context, object value)

Parameters

context object

The serialization context.

value object

The object to test for a reference.

Returns

bool

true if the specified object is referenced; otherwise, false.

ResolveReference(object, string)

Resolves a reference to its object.

object ResolveReference(object context, string reference)

Parameters

context object

The serialization context.

reference string

The reference to resolve.

Returns

object

The object that