Migrate C ++ application from jsoncpp to rapidjson

I have to modify a linux C ++ application developed some time ago, which
use the jsoncpp library so that it uses rapidjson instead.

The original application has the following lines of code that make use of jsoncpp:

**#include <jsoncpp/json/json.h>**

** Json::Reader reader;**
** Json::Value jval_1;**

** reader.parse(json_str,jval_1)**

** Json::Value jval_2 = jval_1[“descriptor”];**
** long long lid_1 = jval_2[“id1”].asInt64();**

** const Json::Value& jid_2 = jval_2[“id2”];**

** Json::Value jmsg;**
** if(!reader.parse(_function1[id2], jmsg))**
** {**
** . . .**
** }**

** double dvalue = val_1[“descriptor”][“tag”].asInt64();**

This application compiles correctly and works right.

I need to modify the above lines of code so that they work correctly using the rapidjson library, instead of jsoncpp.

I am not aware of either of these two IDEs and would appreciate any help in this regard.