I am trying to post a json with xml message inside it. However it returns
invalid character \'b\' looking for beginning of value
I think the possible reason
The error indicates that the server did not return a valid JSON response. I suggest adding the following code to debug the issue:
err := json.Unmarshal(resBody, v)
if err != nil {
log.Printf("error decoding sakura response: %v", err)
if e, ok := err.(*json.SyntaxError); ok {
log.Printf("syntax error at byte offset %d", e.Offset)
}
log.Printf("sakura response: %q", resBody)
return err
}