Update Resource.cs

Handle nested Dictionaries during deserialization. Otherwise we get an error trying to convert a string to a dictionary.