mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 21:32:11 +08:00
Merge 82e61fd9ddfc2fac9004ccaa476d078da70637a8 into d4a64265f21993368c90602c18e778bf04ef36db
This commit is contained in:
commit
1a8c122d67
@ -62,8 +62,8 @@ func (msg *Error) JSON() any {
|
|||||||
case reflect.Struct:
|
case reflect.Struct:
|
||||||
return msg.Meta
|
return msg.Meta
|
||||||
case reflect.Map:
|
case reflect.Map:
|
||||||
for _, key := range value.MapKeys() {
|
for iter := value.MapRange(); iter.Next(); {
|
||||||
jsonData[key.String()] = value.MapIndex(key).Interface()
|
jsonData[iter.Key().String()] = iter.Value().Interface()
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
jsonData["meta"] = msg.Meta
|
jsonData["meta"] = msg.Meta
|
||||||
|
Loading…
x
Reference in New Issue
Block a user