Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:26:25

0001 /*
0002  * JSONSerializer.h
0003  *
0004  *  Created on: Aug 2, 2012
0005  *      Author: aspataru
0006  */
0007 
0008 #ifndef JSONSERIALIZER_H_
0009 #define JSONSERIALIZER_H_
0010 
0011 #include "EventFilter/Utilities/interface/JsonSerializable.h"
0012 
0013 #include <string>
0014 
0015 namespace jsoncollector {
0016   class JSONSerializer {
0017   public:
0018     JSONSerializer();
0019     virtual ~JSONSerializer();
0020 
0021     /**
0022    * Serializes a JsonSerializable object to output string
0023    */
0024     static bool serialize(JsonSerializable* pObj, std::string& output);
0025     /**
0026    * Deserializes input from a string to the JsonSerializable object
0027    */
0028     static bool deserialize(JsonSerializable* pObj, std::string& input);
0029   };
0030 }  // namespace jsoncollector
0031 
0032 #endif /* JSONSERIALIZER_H_ */