Replace spaces by newlines in generated JSON header