Output json object as text for debug
This commit is contained in:
parent
49b2dbe4c7
commit
8d1b95060a
@ -24,6 +24,9 @@ type PlayerPosResponse struct {
|
|||||||
func (p *PlayerEntity) ParsePositionRequest(data []byte) (PlayerPosResponse, error) {
|
func (p *PlayerEntity) ParsePositionRequest(data []byte) (PlayerPosResponse, error) {
|
||||||
var response PlayerPosResponse
|
var response PlayerPosResponse
|
||||||
err := json.Unmarshal(data, &response)
|
err := json.Unmarshal(data, &response)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("Failed to parse: %s", string(data[:]))
|
||||||
|
}
|
||||||
return response, err
|
return response, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user