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