Description
I notice that purejson add new line to the end of json compare with json
How to reproduce
package main
import (
"github.com/gin-gonic/gin"
)
func main() {
g := gin.Default()
g.GET("/purejson", func(c *gin.Context) {
c.PureJSON(200, gin.H{"hello": "world"})
})
g.GET("/json", func(c *gin.Context) {
c.JSON(200, gin.H{"hello": "world"})
})
g.Run(":9000")
}
Expectations
purejson only diff in html escaping with json
Actual result
purejson add newline to json
Environment
- go version: go version go1.14.8 darwin/amd64
- gin version (or commit ref): github.com/gin-gonic/gin v1.7.4
- operating system: Darwin MacBook-Pro-3.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64