OK this here gave me the solution to the problem How to deserialize object that can be an array or a dictionary with Newtonsoft?
public Dictionary<string, string> Location_Options
{
get
{
var json = this.LocationsJson.ToString();
if (json == string.Empty | json == "[]")
{
return new Dictionary<string, string>();
}
else
{
return JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
}
}
}
[JsonProperty(PropertyName = "Locations")]
public object LocationsJson { get; set; }
Many thanks for your help everyone