Table of Contents

Method Serialize

Namespace
Pinwheel.Vista.Graph
Assembly
Pinwheel.Vista.Runtime.dll

Serialize<T>(T)

Serializes one object into a Serializer.JsonObject that preserves both its JSON payload and concrete type.

public static Serializer.JsonObject Serialize<T>(T item)

Parameters

item T

Object to serialize.

Returns

Serializer.JsonObject

Type Parameters

T

Compile-time type of the item being serialized.

Exceptions

ArgumentNullException

Thrown when item is null.

Serialize<T>(IEnumerable<T>)

Serializes a sequence into a list of Serializer.JsonObject wrappers, skipping failed items and logging warnings instead of aborting the whole batch.

public static List<Serializer.JsonObject> Serialize<T>(IEnumerable<T> items)

Parameters

items IEnumerable<T>

Sequence to serialize.

Returns

List<Serializer.JsonObject>

Type Parameters

T

Compile-time type of the items being serialized.