Hi, --- On Thu, Oct 2, 2014 at 8:46 AM, YOGESHWAR DAN CHARAN <[email protected]> wrote: | I will use rapidjson <https://github.com/charany1/rapidjson> library \--
Okay. --- | ,since it's header only C++ library for parsing json and doesn't depend on | BOOST / STL. \-- We might switch to using Boost in future. But, you can use rapidjson for a start. --- | 1)Adaptor(Simulator)-Agent interface: In code how and where, is simulator | passing time|key|value lines to agent \-- This is sent through the socket connection between the adapter and the agent. --- | 2)Agent -Client interface: How curl is acting as client? How is xml data | being supplied to terminal when : \--- Curl receives the XML from the agent through the socket connection. You can look into the source code for specific details. --- | also give me some tips as to how to read c++ code iin a better manner. \-- Worth reading: http://norvig.com/21-days.html You need to learn to break down the task into sub-tasks ("divider and conquer"). Let me list down the sub-tasks for you: #JSON-1 Take one XML that you receive from the curl output, and convert into JSON using any existing tool. For example: http://www.utilities-online.info/xmltojson/ #JSON-2 Write a standalone C++ program to create the JSON for one XML output using rapidjson. #JSON-3 Enhance the C++ program to generate different JSON output for the various XML outputs seen from the curl. Write tests to verify the output. #JSON-4 Integrate this C++ program into the cppagent code base, and also update the build for the same. When you finish every sub-task, please submit your work for review. Thanks! SK -- Shakthi Kannan http://www.shakthimaan.com _______________________________________________ Users mailing list [email protected] http://lists.dgplug.org/listinfo.cgi/users-dgplug.org
