Both the json (Salt) and tojson (Jinja2) filters escape new lines
as \\n in JSON strings.
In this specific case, we need a direct \n, as we output configuration
and not a string template to be rendered aftewards.
This new line escape dance is a little bit hacky, but it's not straightforward
to determine what kind of JSON it needs to produce, to create a new filter.
This is a follow-up for dda0e01728ce.
Ref T1871.