it decoded into {ololo_room first [<nil> <nil>]}
decoding:
err := json.NewDecoder(r.Body).Decode(&message)
if err != nil {
log.Println(err)
}
and I got error:
Error response: 422, map[error:services/chatkit/unprocessable_entity/validation_failed error_description:One of `content`, `url` or `attachment` field must be present error_uri:https://docs.pusher.com/errors/services/chatkit/unprocessable_entity/validation_failed]
When I'm trying parse reguest-json to chatkit.SendMultipartMessageOptions
var message chatkit.SendMultipartMessageOptions
err := json.NewDecoder(r.Body).Decode(&message)
log.Println(message)
it prints:
2019/07/14 20:13:42 { [<nil> <nil>]}
2019/07/14 20:13:42 json: cannot unmarshal object into Go struct field SendMultipartMessageOptions.Parts of type core.NewPart
Please tell me how can I marshal request json in SendMultipartMessageOptions struct correctly?
Hello I have struct for marshaling json-request
And then I sending json like:
it decoded into
{ololo_room first [<nil> <nil>]}
decoding:and I got error:
When I'm trying parse reguest-json to
chatkit.SendMultipartMessageOptions
it prints:
Please tell me how can I marshal request json in
SendMultipartMessageOptions
struct correctly?