AddResource now takes an empty struct as first parameter
refactored Unmarshal to use unmarshalValue which returns reflect.Value

needed for unmarshaling into reflect-created slices