| 1234567891011121314151617 |
- // Copyright 2018 Gin Core Team. All rights reserved.
- // Use of this source code is governed by a MIT style
- // license that can be found in the LICENSE file.
- // +build go1.7
- package gin
- import (
- "github.com/gin-gonic/gin/render"
- )
- // PureJSON serializes the given struct as JSON into the response body.
- // PureJSON, unlike JSON, does not replace special html characters with their unicode entities.
- func (c *Context) PureJSON(code int, obj interface{}) {
- c.Render(code, render.PureJSON{Data: obj})
- }
|