diff --git a/tools/rest/multi_binder.go b/tools/rest/multi_binder.go index 58c96560..86b18de9 100644 --- a/tools/rest/multi_binder.go +++ b/tools/rest/multi_binder.go @@ -92,7 +92,7 @@ func bindFormData(c echo.Context, i interface{}) error { } else { normalized := make([]any, total) for i, vItem := range v { - normalized[i] = vItem + normalized[i] = normalizeMultipartValue(vItem) } rv.SetMapIndex(reflect.ValueOf(k), reflect.ValueOf(normalized)) } diff --git a/tools/rest/multi_binder_test.go b/tools/rest/multi_binder_test.go index d4592287..144733c6 100644 --- a/tools/rest/multi_binder_test.go +++ b/tools/rest/multi_binder_test.go @@ -50,7 +50,7 @@ func TestBindBody(t *testing.T) { }.Encode(), ), echo.MIMEApplicationForm, - `{"bool":true,"bools":["true","false"],"number":-123,"numbers":["123","456"],"stings":["str1","str2"],"string":"str"}`, + `{"bool":true,"bools":[true,false],"number":-123,"numbers":[123,456],"stings":["str1","str2"],"string":"str"}`, false, }, }