do not write newlines in base64 encoded buffer data. JSON strings may not contain (unescaped) newlines.