Table of Contents

Interface ISerialization

Namespace
LibGFX.Core
Assembly
LibGFX.dll

Defines methods to serialize an object to a JSON representation and to deserialize an object from a JSON representation.

public interface ISerialization

Remarks

Implement this interface to enable custom serialization and deserialization of objects using JSON. The interface uses the JObject type from the Newtonsoft.Json.Linq namespace to represent JSON data.

Methods

Deserialize(JObject, SerializationContext, Func<JObject, bool>)

Populates the current object with values from the specified JSON object.

void Deserialize(JObject obj, SerializationContext serializationContext, Func<JObject, bool> callback = null)

Parameters

obj JObject
serializationContext SerializationContext
callback Func<JObject, bool>

Serialize(JsonWriter, SerializationContext, Action<JsonWriter>)

Serializes the current object to a new JSON object representation.

void Serialize(JsonWriter writer, SerializationContext serializationContext, Action<JsonWriter> callback = null)

Parameters

writer JsonWriter
serializationContext SerializationContext
callback Action<JsonWriter>