Method Deserialize
Deserialize<T>(JsonObject, params object[])
Reconstructs one object from its serialized wrapper and optional constructor arguments.
public static T Deserialize<T>(Serializer.JsonObject item, params object[] constructorArgs) where T : class
Parameters
itemSerializer.JsonObjectSerialized wrapper containing the runtime type and JSON payload.
constructorArgsobject[]Constructor arguments used when creating the instance before overwriting fields from JSON.
Returns
- T
Type Parameters
TExpected base type of the deserialized object.
Exceptions
- ArgumentException
Thrown when the serialized type is invalid or cannot be resolved from loaded assemblies.
Deserialize<T>(IEnumerable<JsonObject>, params object[])
Deserializes a sequence of serialized wrappers, skipping failed items and logging warnings instead of aborting the whole batch.
public static List<T> Deserialize<T>(IEnumerable<Serializer.JsonObject> items, params object[] constructorArgs) where T : class
Parameters
itemsIEnumerable<Serializer.JsonObject>Serialized wrappers to reconstruct.
constructorArgsobject[]Constructor arguments forwarded to each object creation call.
Returns
- List<T>
Type Parameters
TExpected base type of the deserialized objects.
Deserialize<T>(IEnumerable<JsonObject>, Func<JsonObject, T>, params object[])
Deserializes a sequence of serialized wrappers, using a fallback factory when type resolution fails for an item.
public static List<T> Deserialize<T>(IEnumerable<Serializer.JsonObject> items, Func<Serializer.JsonObject, T> fallbackFactory, params object[] constructorArgs) where T : class
Parameters
itemsIEnumerable<Serializer.JsonObject>Serialized wrappers to reconstruct.
fallbackFactoryFunc<Serializer.JsonObject, T>Factory that can create an in memory placeholder from the original serialized payload.
constructorArgsobject[]Constructor arguments forwarded to each object creation call.
Returns
- List<T>
Type Parameters
TExpected base type of the deserialized objects.