Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public class ListVoicesResponseJsonConverter : global::System.Text.Json.Serializ
{
try
{

var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList<global::PlayHT.Voice>), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IList<global::PlayHT.Voice>> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList<global::PlayHT.Voice>).Name}");
listVoicesResponseVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
Expand All @@ -85,9 +86,13 @@ public class ListVoicesResponseJsonConverter : global::System.Text.Json.Serializ
catch (global::System.InvalidOperationException)
{
}
}

if (listVoicesResponseVariant1 == null && listVoicesResponseVariant2 == null)
{
try
{

var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::PlayHT.ListVoicesResponseVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::PlayHT.ListVoicesResponseVariant2> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::PlayHT.ListVoicesResponseVariant2).Name}");
listVoicesResponseVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public class StreamSpeechRequestJsonConverter : global::System.Text.Json.Seriali
{
try
{

var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::PlayHT.CreateSpeechRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::PlayHT.CreateSpeechRequest> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::PlayHT.CreateSpeechRequest).Name}");
create = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
Expand All @@ -93,9 +94,13 @@ public class StreamSpeechRequestJsonConverter : global::System.Text.Json.Seriali
catch (global::System.InvalidOperationException)
{
}
}

if (create == null && streamSpeechRequestVariant2 == null)
{
try
{

var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::PlayHT.StreamSpeechRequestVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::PlayHT.StreamSpeechRequestVariant2> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::PlayHT.StreamSpeechRequestVariant2).Name}");
streamSpeechRequestVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
Expand Down