Search code examples
c++jsonrapidjson

How to transition from getString rapidjson to std::string


I want to assign a string value from rappidjson to my variable class.

void MyClass::setName(Ch* jsonString) 
{
    _name = (std::string)jsonString; 
}

Solution

  • I solved the problem.

    void MyClass::setName(Ch* jsonString)
    {
       _name = jsonString;
    }