go-macaron/macaron

func ctx.JSONString() parser issue.

MiyamuraMiyako opened this issue · 1 comments

image

image

image

I think golang slice with zero element to json should be [], but I got null.

The zero value of []T is nil, it is not the same as an empty slice with zero elements. You need models := []T{} to make the slice to be initialized.