This sound very simple. But I can't find how to do it.
I've receiving a bad json from an api. the actual json is inside a string
Instead of
[{\"ProductId\":1,\"ProductName\":\"abuka\",\"Rate\":6.00,\"Quantity\":10.000},{\"ProductId\":2,\"ProductName\":\"abuka\",\"Rate\":6.00,\"Quantity\":10.000},{\"ProductId\":3,\"ProductName\":\"abuka\",\"Rate\":6.00,\"Quantity\":10.000}]
I'm receiving
"[{\"ProductId\":1,\"ProductName\":\"abuka\",\"Rate\":6.00,\"Quantity\":10.000},{\"ProductId\":2,\"ProductName\":\"abuka\",\"Rate\":6.00,\"Quantity\":10.000},{\"ProductId\":3,\"ProductName\":\"abuka\",\"Rate\":6.00,\"Quantity\":10.000}]"
When I try
JsonConvert.DeserializeObject<List<Product>> (jsonString)
I get error Error converting to System.Collections.Generic.List
How can I extract it into a valid JSON string before deserialising?
