Reference for JSON files wanted

I know a lot of content has been moved to JSON.
I want to know where I find some kind of reference so I know how to structure these files.
I don’t mean the JSON format itself, I mean how the game interprets the content of the JSON files.
At the moment, I can only guess how file structure works, which is suboptimal in my opinion.

Remember I don’t want a tutorial, just a reference to look up stuff.

The starting place would be about halfway down the item_factory.cpp file (line ~645). Other then that for the actual JSON implementation you would want to take a look at json.cpp and json.h. (And maybe savegame_json.cpp for save game transliteration).

Thanks.
Someone in IRC pointed me towards a more complete documentation.

It’s right in the game files itself:
The files doc/JSON_FLAGS.md, doc/JSON_INFO.md and MODDING.txt