Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Deserialize a Dictionary

string json = @"{
  'href': '/account/login.aspx',
  'target': '_blank'
}";

Dictionary<string, string> htmlAttributes = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);

Console.WriteLine(htmlAttributes["href"]);
// /account/login.aspx

Console.WriteLine(htmlAttributes["target"]);
// _blank
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# remove duplicate cards 
Csharp :: c# show existing form 
Csharp :: fluent api c# hasmany withmany 
Csharp :: c# ? behind variable 
Csharp :: serenity get id from insert repository 
Csharp :: IEqualityComparer gethashcode strings c# 
Csharp :: how to configure asp.net core on ionon 1&1 hosting 
Csharp :: convert excel to datatable using epplus 
Csharp :: c# language 
Csharp :: dateTime to dataRow in c# 
Csharp :: convert relative path to physical path c# 
Csharp :: f sharp make parameter mutable 
Csharp :: user control equivalent event for form.shown c# 
Csharp :: c# easy 
Csharp :: mental retardation 
Csharp :: c# variable 
Csharp :: unity c# public all codes 
Csharp :: winforms reportviewer.print report 
Csharp :: binance slp to php 
Csharp :: c# use readonly array as method default 
Csharp :: C# system dont let write txt file 
Csharp :: asp.net core relative file path within console app 
Csharp :: unity get refresh rate 
Csharp :: .net 6 minimal api authorization net 6 
Csharp :: how can i replace Any for All method and vice versa linq in c# 
Csharp :: c# 2 timespan return yesterday 
Csharp :: c# get buttons row and column in grid 
Csharp :: how to reset disk permission 
Csharp :: return last row if all other condition fails in linq c# 
Csharp :: dotcms contentidentifier 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =