Skip to content

Commit 0416816

Browse files
committed
Remove extra
1 parent 61e45af commit 0416816

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

dotnet/src/webdriver/Command.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// limitations under the License.
1717
// </copyright>
1818

19-
using OpenQA.Selenium.Internal;
2019
using System.Collections.Generic;
2120
using System.Text.Json;
2221
using System.Text.Json.Serialization;
@@ -28,11 +27,6 @@ namespace OpenQA.Selenium
2827
/// </summary>
2928
public class Command
3029
{
31-
private readonly static JsonSerializerOptions s_jsonSerializerOptions = new()
32-
{
33-
Converters = { new ResponseValueJsonConverter() }
34-
};
35-
3630
private SessionId commandSessionId;
3731
private string commandName;
3832
private Dictionary<string, object> commandParameters = new Dictionary<string, object>();
@@ -129,7 +123,7 @@ public override string ToString()
129123
/// <returns>A <see cref="Dictionary{K, V}"/> with a string keys, and an object value. </returns>
130124
private static Dictionary<string, object> ConvertParametersFromJson(string value)
131125
{
132-
Dictionary<string, object> parameters = JsonSerializer.Deserialize<Dictionary<string, object>>(value, s_jsonSerializerOptions);
126+
Dictionary<string, object> parameters = JsonSerializer.Deserialize(value, CommandSerializerContext.Default.SerializableCommand).Data;
133127
return parameters;
134128
}
135129
}

0 commit comments

Comments
 (0)