types.hpp: Introduce NOM_STUBBED macro
Initial refactoring of JSON module