Open wrbdev opened 2 years ago
Problem is with symbol GTLB.
Market stack is sending back an empty [] instead of an object {} for a particular element, which breaks deserialization,
Essentially bad JSON is being returned from MarketStack. Not a good look...
Hi there, looks like I am receiving a bad element back from a eod/latest call which normally works fine... Seems to have just started happening. Not sure if its a bad symbol or something I am doing wrong. I am receiving a empty array for one element where I am expecting a eod object. This is breaking the standard deserializer for both RestSharp and Newtonsoft. Are there any suggestions or examples on how to handle this without iterating over each element or using a custom converter. Many thanks in advance!
Example response snip..
{ "open":408.01, "high":415.94, "low":407.6, "close":413.69, "volume":3774912.0, "adj_high":null, "adj_low":null, "adj_close":413.69, "adj_open":null, "adj_volume":null, "split_factor":1.0, "symbol":"GS", "exchange":"XNYS", "date":"2021-10-18T00:00:00+0000" }, [