You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A bug of function httpx.ParseJsonBody.
If I use A []interface{}json:"a" to parse, httpx.ParseJsonBody will panic with error reflect: Key of non-map type interface {}, but json.Unmarshal could parse successfully.
Otherwise, if I use A []Bjson:"a" to parse, httpx.ParseJsonBody could parse successfully.
To Reproduce
Steps to reproduce the behavior, if applicable:
Describe the bug
to parse, httpx.ParseJsonBody will panic with error
A bug of function httpx.ParseJsonBody.
If I use
A []interface{}
json:"a"reflect: Key of non-map type interface {}
, but json.Unmarshal could parse successfully.Otherwise, if I use
to parse, httpx.ParseJsonBody could parse successfully.
A []B
json:"a"To Reproduce
Steps to reproduce the behavior, if applicable:
The code is
body of requese:
The error is
Expected behavior
Could parse json successfully while using interface{} array.
Screenshots
use json.Unmarshal could parse successfully.
Environments (please complete the following information):
More description
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: