title: How to transfer a string into a JSON in C++?
body: <p>In the code, I would like to transform a received std::string with a format like</p>
  <blockquote>
  <p>xxx:yyy,iii:jjj</p>
  </blockquote>
  <p>into a JSON.
  This string is received from clients' side.
  I got the error messae as <code>[json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value - invalid literal; last read: 'x'</code>. The test code is as below.</p>
  <pre><code>    std::string className;
      std::string instanceId;
      parseUrl(requestUrl, className, instanceId);
  
      try {
          nlohmann::json j = nlohmann::json::parse(instanceId);
          syslog(LOG_ERR, &quot;instanceId:: xxx: %s&quot;, j[&quot;xxx&quot;].get&lt;std::string&gt;().c_str());
      } catch (nlohmann::detail::exception&amp; e) {
          syslog(LOG_ERR, &quot;message: %s&quot;, e.what());
      }
  </code></pre>
  <p>How could I transform the sting into a so-called raw string or something-else which is acceptable by nlohmann::json::parse().</p>