mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 12:12:12 +08:00
Added JSON initialization function
This commit is contained in:
parent
e7564a55ac
commit
75eefd484a
@ -19,6 +19,10 @@ type JSON struct {
|
||||
Data any
|
||||
}
|
||||
|
||||
func NewJSON(data any) Render {
|
||||
return &JSON{Data: data}
|
||||
}
|
||||
|
||||
// IndentedJSON contains the given interface object.
|
||||
type IndentedJSON struct {
|
||||
Data any
|
||||
|
Loading…
x
Reference in New Issue
Block a user