If you can change the JSON's structure then warehouses should be an object and not an array.Instead of this:
warehouses:[{id: "1122", isActive: true}, {id: "1123", isActive: true}]
Do this:
warehouses: {"1122": {isActive: true}, "1123": {isActive: false}}
And then, use Dictionary<string, Warehouse> as your type.
If you cannot change the json's structure you can:
1. Create two kinds of classes. The first one will match the JSON and the second one will match your server. You can use AutoMapper to map between the clasess since they will be almost the same.
2. Create a custom class that inherits from List<Warehouse>, expose an indexer and handle the conversion from a list to a dictionary internally.
3. Create a custom JsonConverter or apply a custom serializer - I think that it's the worst way to solve this issue but it can be handy sometimes..