How to handle std::vector<std::uint8_t> #1930
Labels
kind: question
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
state: stale
the issue has not been updated in a while and will be closed automatically soon unless it is updated
I have built my own sockets layer, which works for an application I am working on.
The response from the Send returns a "complex" type containing the following data
The reason the complex type represents the body as vector of bytes is the api will also transfer binary data as well as JSON string data.
My problem is when I do HTTP post, my data is sent correctly to the server. It updates the database, and then returns to my client. In the response, there is JSON data. I am trying to work out how to construct a JSON "object" that I can call contains to query the structured information for the certain returned data.
I have tried
nlohman::json _json(_response.body);
but it appears unable to find the nodes when I query the using contains. I have manually tried converting the vector of bytes to a string and parsing that, to no available.
I guess what I am asking for, is what section of the help should I look at more closely, to find the solution.
The text was updated successfully, but these errors were encountered: