mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 12:37:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.615.2
This commit is contained in:
@@ -28,6 +28,16 @@ namespace LukeHagar.PlexAPI.SDK.Utils
|
||||
return JsonConvert.DeserializeObject<T>(json, new JsonSerializerSettings(){ NullValueHandling = nullValueHandling, MissingMemberHandling = missingMemberHandling, Converters = Utilities.GetJsonDeserializers(typeof(T))});
|
||||
}
|
||||
|
||||
public static T DeserializeNotNull<T>(string json, NullValueHandling nullValueHandling=NullValueHandling.Ignore, MissingMemberHandling missingMemberHandling=MissingMemberHandling.Ignore)
|
||||
{
|
||||
var result = ResponseBodyDeserializer.Deserialize<T>(json, nullValueHandling, missingMemberHandling);
|
||||
if (result == null)
|
||||
{
|
||||
throw new Exception($"Deserialization error: {typeof(T).Name} cannot be null.");
|
||||
}
|
||||
return result!;
|
||||
}
|
||||
|
||||
public sealed class MissingMemberException : Exception
|
||||
{
|
||||
public MissingMemberException() : base("Missing member.") { }
|
||||
|
||||
Reference in New Issue
Block a user