Method Serialize
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
itemTObject to serialize.
Returns
Type Parameters
TCompile-time type of the item being serialized.
Exceptions
- ArgumentNullException
Thrown when
itemis 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
itemsIEnumerable<T>Sequence to serialize.
Returns
Type Parameters
TCompile-time type of the items being serialized.