-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
So the websocket gateway I am connecting to sends and receives data in JSON encoding. Right now when I receive the data it just comes in string format, which is fine to parse. However, with the websocket_outgoing_message class you can only set the outgoing payload to be binary or utf8 encoding, and for utf-8 excepts a std::string argument. I can't simply just build up a json object with web::json and send it in as an argument with as_string() because the object(s) I need to send have strings, booleans, ints, and nested objects alike.
So my question is, should I be able to just pass in a std::string in JSON format, given that on the receiving end it takes the JSON and spits out a std::string? Or is this client library simply only able to send simple strings to the websocket server. I've been trying a couple things, but I thought I'd ask here just in case it isn't possible. Thanks!