Skip to content

Commit

Permalink
code style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stasput committed Nov 20, 2024
1 parent c8ff3f1 commit d8f6481
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ public class TwoKeysDictionaryConvertor<T> : JsonConverter<Dictionary<(string, s
{
var intermediateDictionary = JsonSerializer.Deserialize<Dictionary<string, T>>(ref reader);
var actualDictionary = new Dictionary<(string, string), T>();

foreach (var keyValue in intermediateDictionary)
{
// stringKeys = "key1, key2"
var stringKey = keyValue.Key.Substring(1, keyValue.Key.Length - 2);
var stringKeys = stringKey.Split(',', ' ');
var firstKey = stringKeys.First();
var secondKey = stringKeys.Last();

actualDictionary.Add((firstKey, secondKey), keyValue.Value);
}

Expand Down

0 comments on commit d8f6481

Please sign in to comment.