Closed ASCE1885 closed 7 years ago
You can't assign to a const reference in the constructor (e.g. mValue). Consider writing your constructor like this:
HFJsonObject::HFJsonObject(HFString& jsonString)
: mDocument(sajson::literal((const char*)jsonString.GetBuffer()))
, mValue(mDocument.get_root())
{}
Does that work?
I wanna wrap sajson,so I declare my class like this:
In the cpp file:
and compile error occur:
but this would work:
as a result, I cannot implements the other function like GetInteger, GetDouble etc.. because I cannot get the sajson::value variable