public void BuildCurrentSet() { //var ValuePlaceHolder = new Dictionary<string, Dictionary<string, string>>(); var Json = AlphaRequest.Request("GLOBAL_QUOTE", Symbol); var JsonDeserialized = JsonConvert.DeserializeObject <Dictionary <string, object> >(Json); //<s,o> var ValuePlaceHolder = JsonConvert.DeserializeObject <Dictionary <string, string> >(JsonDeserialized.ElementAt(0).Value.ToString()); CurrentData = ValuePlaceHolder; }
public void BuildStandardSets(string SeriesType, String Interval = "5min") { var ValuePlaceHolder = new Dictionary <string, Dictionary <string, string> >(); var Json = AlphaRequest.Request(SeriesType, Symbol, Interval); var JsonDeserialized = JsonConvert.DeserializeObject <Dictionary <string, object> >(Json); //<s,o> Dictionary <string, string> MetaData = JsonConvert.DeserializeObject <Dictionary <string, string> >(JsonDeserialized["Meta Data"].ToString()); JsonDeserialized.Remove("Meta Data"); this.MetaData = MetaData; JsonDeserialized = JsonConvert.DeserializeObject <Dictionary <string, object> >(JsonDeserialized.ElementAt(0).Value.ToString()); //<s,o> foreach (KeyValuePair <string, object> item in JsonDeserialized) { var valueDict = JsonConvert.DeserializeObject <Dictionary <string, string> >(item.Value.ToString()); ValuePlaceHolder.Add(item.Key, valueDict); } ValueSeries = ValuePlaceHolder; }