build,json: fix generation with empty profiles