Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Please help me with your QT code for correcting my JSON file which described below



  • Hi Friends,

    Please some one can help me with following scenario. It was screwed a lot , here is my problem.

    {
    "connection":{
    "type":"ETH10G",
    "param":{
    "devip":"192.168.0.166",
    "localip":"192.168.0.160",
    "stream_port":15560,
    "control_port":15561,
    "event_port":15562
    }
    },
    "system":{
    "mode":"reprocessing",
    "dbc":{
    "file":"LGSim_CAN.dbc",
    "table":"LGSim_CAN.table"
    }
    },
    "reprocess":{
    "type":"ROS-IF",
    "param":{
    "ip":"127.0.0.1",
    "port":9090,
    "width":1280,
    "height":720,
    "pixelformat":10
    }
    }
    In above json file i want to modify the values of in side "param" but its unable to change the values in side it, where as it is inserting a new value out of param list as shown below.

    "connection": {
    "type": "ETH10G"
    "devip": "198.168.1.2",
    "param": {
    "control_port": 15561,
    "devip": "192.168.0.166",
    "event_port": 15562,
    "localip": "192.168.0.160",
    "stream_port": 15560
    },
    }
    please assists me with your views the way to assign the values to the keys inside the flow: Connection-->param--> devip: new_value.

    During my execution the variable is created out of the scope of the param list inside a connection, The desired format should be the assigend key and value inside scope of param list inside connection object


  • Lifetime Qt Champion

    Hi,

    Isn't that the same question as this thread where you already have answers ?



  • @SGaist : That having code but it doesn't provide desired output as i am expecting .


  • Lifetime Qt Champion

    @Raji said in Please help me with your QT code for correcting my JSON file which described below:

    @SGaist : That having code but it doesn't provide desired output as i am expecting .

    That's not clear at all and as already said in my previous post, it looks the same as your other thread except maybe that in this one your are explicitly asking people to write the code for you.



  • @SGaist : I am not asking to write code, just i am asking how to modify the value in param
    i am able to modify the value in connections ,but i am unable modify the value of param, i want to refer to connection->param->"devid": new value . how to modify that value i am asking sir.


  • Lifetime Qt Champion

    What code are you using ?


Log in to reply