add binding json and forms

This commit is contained in:
2024-11-13 17:04:32 +01:00
parent f262cf57ce
commit 5f0dee29e2
3 changed files with 237 additions and 2 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import (
type Foo struct {
Bar string `json:"bar"`
Taz int `json:"taz"`
Taz int `json:"something"`
Car *string `json:"car"`
}
@@ -19,7 +19,7 @@ func Test_JSON(t *testing.T) {
W: rr,
}
expected := `{"bar":"bar","taz":30,"car":null}`
expected := `{"bar":"bar","something":30,"car":null}`
c.JSON(http.StatusOK, Foo{
Bar: "bar",