Skip to content

Commit

Permalink
[dotnet] Add more well-known dictionary types for capability json ser…
Browse files Browse the repository at this point in the history
…ialization
  • Loading branch information
nvborisenko committed Nov 4, 2024
1 parent 53836c7 commit 6f41ef9
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions dotnet/src/webdriver/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,27 @@ private static Dictionary<string, object> ConvertParametersFromJson(string value
// Selenium WebDriver types
[JsonSerializable(typeof(char[]))]
[JsonSerializable(typeof(byte[]))]
[JsonSerializable(typeof(Dictionary<string, object>))]
[JsonSerializable(typeof(Cookie))]
[JsonSerializable(typeof(ReturnedCookie))]
[JsonSerializable(typeof(Proxy))]
internal partial class CommandJsonSerializerContext : JsonSerializerContext
{

}
// Selenium Dictionaries, primarily used in Capabilities
[JsonSerializable(typeof(Dictionary<string, object>))]

[JsonSerializable(typeof(Dictionary<string, bool>))]
[JsonSerializable(typeof(Dictionary<string, byte>))]
[JsonSerializable(typeof(Dictionary<string, sbyte>))]
[JsonSerializable(typeof(Dictionary<string, char>))]
[JsonSerializable(typeof(Dictionary<string, decimal>))]
[JsonSerializable(typeof(Dictionary<string, double>))]
[JsonSerializable(typeof(Dictionary<string, float>))]
[JsonSerializable(typeof(Dictionary<string, int>))]
[JsonSerializable(typeof(Dictionary<string, uint>))]
[JsonSerializable(typeof(Dictionary<string, nint>))]
[JsonSerializable(typeof(Dictionary<string, nuint>))]
[JsonSerializable(typeof(Dictionary<string, long>))]
[JsonSerializable(typeof(Dictionary<string, ulong>))]
[JsonSerializable(typeof(Dictionary<string, short>))]
[JsonSerializable(typeof(Dictionary<string, ushort>))]
internal partial class CommandJsonSerializerContext : JsonSerializerContext;
}

0 comments on commit 6f41ef9

Please sign in to comment.