mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: Fix: Checkpoint Deserialization breaks when JSON metadata properties are out of order (#3442)
* Fix checkpoint JSON deserialization with out-of-order metadata properties (#2962) * Simplify: propagate AllowOutOfOrderMetadataProperties from incoming JsonSerializerOptions
This commit is contained in:
committed by
GitHub
Unverified
parent
6c37ce8450
commit
e489ac0fa3
@@ -13,7 +13,13 @@ internal sealed class JsonMarshaller : IWireMarshaller<JsonElement>
|
||||
|
||||
public JsonMarshaller(JsonSerializerOptions? serializerOptions = null)
|
||||
{
|
||||
this._internalOptions = new JsonSerializerOptions(WorkflowsJsonUtilities.DefaultOptions);
|
||||
this._internalOptions = new JsonSerializerOptions(WorkflowsJsonUtilities.DefaultOptions)
|
||||
{
|
||||
// Propagate from the user-provided options if set; enables support for databases
|
||||
// like PostgreSQL jsonb that do not preserve property order.
|
||||
AllowOutOfOrderMetadataProperties = serializerOptions?.AllowOutOfOrderMetadataProperties is true,
|
||||
};
|
||||
|
||||
this._internalOptions.Converters.Add(new PortableValueConverter(this));
|
||||
this._internalOptions.Converters.Add(new ExecutorIdentityConverter());
|
||||
this._internalOptions.Converters.Add(new ScopeKeyConverter());
|
||||
|
||||
Reference in New Issue
Block a user