I got JSON written in String. The length in Notepad++ shows 210 characters, but in C+++ only 182.
How do I get 210 characters in C++?
Example JSON with Escape quotes:
{\"_id\":\"5de2dff0d6c9e312d659bc42\",\"index\":\"0\",\"guid\":\"eba0e936-0b18-48ec-88ca-00312ede4a7d\",\"isActive\":\"false\",\"balance\":\"$1,636.50\",\"picture\":\"http://placehold.it/32x32\",\"age\":\"36\"}
And my code:
#include <iostream>
using namespace std;
int main()
{
//210 characters
string str = "{\"_id\":\"5de2dff0d6c9e312d659bc42\",\"index\":\"0\",\"guid\":\"eba0e936-0b18-48ec-88ca-00312ede4a7d\",\"isActive\":\"false\",\"balance\":\"$1,636.50\",\"picture\":\"http://placehold.it/32x32\",\"age\":\"36\"}";
cout << "String Length = " << str.length(); // return 182
return 0;
}