Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
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 @@ -458,7 +458,7 @@ private static JArray HeroCardToBlockKit(HeroCard heroCard)
blockKitContent.Add(actionsBlock);
}

return JArray.FromObject(blockKitContent, new JsonSerializer { NullValueHandling = NullValueHandling.Ignore });
return JArray.FromObject(blockKitContent, new JsonSerializer { NullValueHandling = NullValueHandling.Ignore, MaxDepth = null });
}
}
}
2 changes: 2 additions & 0 deletions libraries/Microsoft.Bot.Builder.Azure.Blobs/BlobsStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public BlobsStorage(string dataConnectionString, string containerName, StorageTr
_jsonSerializer = jsonSerializer ?? JsonSerializer.Create(new JsonSerializerSettings
{
TypeNameHandling = TypeNameHandling.All,
MaxDepth = null,
});

// Triggers a check for the existence of the container
Expand All @@ -102,6 +103,7 @@ internal BlobsStorage(BlobContainerClient containerClient, JsonSerializer jsonSe
_jsonSerializer = jsonSerializer ?? JsonSerializer.Create(new JsonSerializerSettings
{
TypeNameHandling = TypeNameHandling.All,
MaxDepth = null,
});

// Triggers a check for the existence of the container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ public BlobsTranscriptStore(string dataConnectionString, string containerName, S
_storageTransferOptions = storageTransferOptions;

_jsonSerializer = jsonSerializer ?? JsonSerializer.Create(new JsonSerializerSettings
{
{
NullValueHandling = NullValueHandling.Ignore,
Formatting = Formatting.Indented,
TypeNameHandling = TypeNameHandling.None,
MaxDepth = null,
});

// Triggers a check for the existance of the container
Expand Down Expand Up @@ -115,6 +116,7 @@ internal BlobsTranscriptStore(BlobContainerClient containerClient, JsonSerialize
_jsonSerializer = jsonSerializer ?? JsonSerializer.Create(new JsonSerializerSettings
{
TypeNameHandling = TypeNameHandling.All,
MaxDepth = null,
});
}

Expand Down
1 change: 1 addition & 0 deletions libraries/Microsoft.Bot.Builder.Azure/AzureBlobStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class AzureBlobStorage : IStorage
{
// we use All so that we get typed roundtrip out of storage, but we don't use validation because we don't know what types are valid
TypeNameHandling = TypeNameHandling.All,
MaxDepth = null,
});

// If a JsonSerializer is not provided during construction, this will be the default static JsonSerializer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class AzureBlobTranscriptStore : ITranscriptStore
{
NullValueHandling = NullValueHandling.Ignore,
Formatting = Formatting.Indented,
MaxDepth = null,
});

private static HashSet<string> _checkedContainers = new HashSet<string>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Microsoft.Bot.Builder.Dialogs.Adaptive.Recognizers
/// </summary>
public abstract class TextEntityRecognizer : EntityRecognizer
{
private static JsonSerializer serializer = new JsonSerializer() { ContractResolver = new CamelCasePropertyNamesContractResolver() };
private static JsonSerializer serializer = new JsonSerializer() { ContractResolver = new CamelCasePropertyNamesContractResolver(), MaxDepth = null };

/// <summary>
/// Initializes a new instance of the <see cref="TextEntityRecognizer"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ internal static class ProtocolMessage
private static readonly JsonSerializer Serializer = new JsonSerializer
{
NullValueHandling = NullValueHandling.Include,
MaxDepth = null,
ContractResolver = new CamelCasePropertyNamesContractResolver()
};

Expand Down
1 change: 1 addition & 0 deletions libraries/Microsoft.Bot.Builder/MemoryStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class MemoryStorage : IStorage
{
TypeNameHandling = TypeNameHandling.All,
ReferenceLoopHandling = ReferenceLoopHandling.Error,
MaxDepth = null
};

// If a JsonSerializer is not provided during construction, this will be the default static JsonSerializer.
Expand Down
6 changes: 4 additions & 2 deletions libraries/Microsoft.Bot.Connector/OAuthClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,8 @@ private void Initialize()
Converters = new List<JsonConverter>
{
new Iso8601TimeSpanConverter()
}
},
MaxDepth = null
};
DeserializationSettings = new JsonSerializerSettings
{
Expand All @@ -735,7 +736,8 @@ private void Initialize()
Converters = new List<JsonConverter>
{
new Iso8601TimeSpanConverter()
}
},
MaxDepth = null
};
CustomInitialize();
}
Expand Down