title: CBOR serialization (string escaping)
body: <p>I was CBOR serializing a JSON object in C++ with nlohmann::json library and my use case involves reading the cbor byte string output in c#.  I've noticed that, whereas when dumping a json object to a string in C++ with nlohmann::json library, json string values (i.e., case value_t::string) are escaped (a call to escape_string is made), no such call is made when json values are string values in the CBOR approach.  </p>
  
  <p>I was reading the CBOR CRF 7049 and it seems that strings do not need to be escaped when serializing to CBOR. 
  The behavior in the nlohmann::json library is consistent: strings are not escaped when serializing, nor excepted to be escaped when de-serializing. 
  But it appears that Newtonsoft.Json (C# library), expects that. Is it a valid expectation? Or am I doing something wrong in the process?</p>
  
  <p>C++ side:</p>
  
  <pre><code>nlohmann::json json_doc;
  json_doc["characters"] = nlohmann::json::array();
  
  for (int i = 0; i &lt; characters.size(); i++) {
      json_doc["characters"][i]["name"] = (characters[i] != nullptr) ? characters[i]-&gt;name() : "";
  }
  
  std::vector&lt;uint8_t&gt; cbor = nlohmann::json::to_cbor(json_doc);
  output-&gt;assign((char*)&amp;cbor[0], cbor.size());
  </code></pre>
  
  <p>C# side. cbor_bytes is the  cbor byte string (c++ output vector)</p>
  
  <pre><code>CBORObject cbor = CBORObject.DecodeFromBytes(cbor_bytes);
  output = cbor.ToString();
  </code></pre>
  
  <p>Such output string by then, is wrongly formed:</p>
  
  <pre><code>{"characters": [{"name": "Clara Oswald"}, {"name": "Kensi Blye"}, {"name": "Temperance "Bones" Brennan"}]}
  </code></pre>
  
  <p>and cannot, obviously be parsed:</p>
  
  <pre><code>JObject output_obj = JObject.Parse(output);
  </code></pre>