Is there a way to convert my custom object to json?
class EntityRepetitive: public EntityTreatment
{
public:
EntityRepetitive(int channelNum,float power,float freq,int numOfPulses,float waitTime, int numOfTrains);
~EntityRepetitive();
int channelNum;
float power;
float freq;
int numOfPulses;
float waitTime;
int numOfTrains;
};
my cpp file:
er = new EntityRepetitive(channelNum,power,freq,numOfPulses,waitTime,numOfTrains);
I want to convert er to JsonString and vice versa.