Greetings,

I've been working with an "old", from January, version of cxxtools, but 
recently I've updated to the latest git version.
Since this last update I'm having issues deserializing, the execution 
gets stuck and won't continue.

#include <cxxtools/json.h>
#include <cxxtools/utf8codec.h>

#include <string>
#include <iostream>
#include <sstream>

struct obj
{
     std::string value;
     friend void operator>>=(const cxxtools::SerializationInfo& si,
                             obj& varObj)
     {
         si.getMember("value", varObj.value);
         //won't work either using the commented version, the commented 
version used to work before
         //cxxtools::String tmpUtf8;
         //si.getMember("value", tmpUtf8);
         //varObj.value = cxxtools::Utf8Codec::encode(tmpUtf8);
     }
};

int main()
{
     obj testObj;
     std::string test(R"({"value":"traducción"})");
     std::istringstream tmpout2(test);
     tmpout2 >> cxxtools::Json(testObj);
     std::cout << testObj.value << std::endl;
}

The execution gets "stuck" at --> tmpout2 >> cxxtools::Json(testObj);
No errors. This used to work before. If I remove the 'ó' works.

Regards,
Joan

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to