25
1
using System;
2
using Newtonsoft.Json;
3
4
public class Program
5
{
6
public static void Main()
7
{
8
var json = "{\"success\":true,\"lowest_price\":\"$2.87\",\"volume\":\"557\",\"median_price\":\"$2.87\"}";
9
var result = JsonConvert.DeserializeObject<Result>(json);
10
result.Dump();
11
}
12
}
13
14
public class Result
15
{
16
public bool Success { get; set; }
17
18
[JsonProperty("lowest_price")]
19
public string LowestPrice { get; set; }
20
21
public int Volume { get; set; }
22
23
[JsonProperty("median_price")]
24
public string MedianPrice { get; set; }
25
}
Cached Result