I have a string
"{
"username": "xyz",
"password": "abc"
}"
How can I convert it to json::value? I found a way wherein I create a http_response with content-type "application/json" and body as the above string and then use the function extract_json. But surely there has to be a simpler way?
"{
"username": "xyz",
"password": "abc"
}"
How can I convert it to json::value? I found a way wherein I create a http_response with content-type "application/json" and body as the above string and then use the function extract_json. But surely there has to be a simpler way?