Avoid unnecessary creation of default StandardEnvironment instances

Issue: SPR-10568
(cherry picked from commit 7e01578)
Introduced "jsonPrefix" bean property

This change involves a modification of the "writeContent" template method to include the "jsonPrefix" String instead of the "prefixJson" boolean flag. Since said template method has only been introduced in 3.2.2, this change should hopefully not be a problem.

Issue: SPR-10567
(cherry picked from commit 28164b4)