Go with the second approach, simply due to the fact that you can introduce new resource types or items at any time without having to rewrite or update code (data driven development).
To elaborate a bit more on why this is in general good practice, even if you're 100% sure some value won't ever change.
Let's take the console game example mentioned in the comments, because this provides a very good reason on why you shouldn't hard-code anything, unless you really have (or want) to, e.g. encryption keys, your own name, etc.
When releasing a game on consoles, these usually have to go through a review process, where the console manufacturer's own QA will test the game, play through it, look for issues, etc. This is mandatory and costs money, a lot of money. I think I've once read that a release might cost 30,000-50,000$ just for the certification alone.
Now imagine you're pushing your game for release, paying the 30,000$ and wait. And suddenly you notice that some of your game values are literally broken. Let's say you can buy iron bars for 50 gold and sell them for 55 gold.
What do you do? If you've hard-coded that stuff, you'll have to create a new update/release version, which will have to go through review once again, so worst case you'll pay once again for the re-certification! I bet Ubisoft won't mind, but for your own little indie games developer pocket… ouch!
But imagine the game would just occasionally check for updated game definitions (e.g. in the form of a JSON file). Your game could download and use the latest version at any time without requiring a new update. You could fix that imbalance/exploit/bug at any time without requiring re-certification or any other money paid. Just some minor design decision, you didn't think was worth it, just saved you a 5 digit sum of money! Isn't that awesome? :)
Just don't get me wrong. This also applies to other types of software and platforms. Downloading updated data files is in general a lot more easy and doable for the standard user, no matter whether it's a game or some kind of application/tool. Imagine a game installed under Program Files in Windows. Your updater needs administrator rights to modify anything and you can't modify running programs. With DDD your program just downloads the data and uses it. The player might not even notice there's been an update.