GROOVY-6554: Improved serialization performance of JsonOutput.