robotframework-jsonlibrary icon indicating copy to clipboard operation
robotframework-jsonlibrary copied to clipboard

Parse error at 1:3 near token ? (?)

Open maqsshah opened this issue 4 years ago • 2 comments

my json exp: $.[?(@.bundle_id=='10')].oper_status my jsonobject is:

{
       "number_of_lag_in_use": 2,
       "number_of_aggregators": 2,
       "interfaces": {
          "Port-channel10": {
             "name": "Port-channel10",
             "bundle_id": 10,
             "protocol": "lacp",
             "flags": "SU",
             "oper_status": "up",
             "members": {
                "TenGigabitEthernet1/0/39": {
                   "interface": "TenGigabitEthernet1/0/39",
                   "flags": "P",
                   "bundled": true,
                   "port_channel": {
                      "port_channel_member": true,
                      "port_channel_int": "Port-channel10"
                   }
                },
                "TenGigabitEthernet1/0/40": {
                   "interface": "TenGigabitEthernet1/0/40",
                   "flags": "P",
                   "bundled": true,
                   "port_channel": {
                      "port_channel_member": true,
                      "port_channel_int": "Port-channel10"
                   }
                }
             },
             "port_channel": {
                "port_channel_member": true,
                "port_channel_member_intfs": [
                   "TenGigabitEthernet1/0/39",
                   "TenGigabitEthernet1/0/40"
                ]
             }
          },
          "Port-channel34": {
             "name": "Port-channel34",
             "bundle_id": 34,
             "protocol": "lacp",
             "flags": "SD",
             "oper_status": "down",
             "members": {
                "TenGigabitEthernet1/0/3": {
                   "interface": "TenGigabitEthernet1/0/3",
                   "flags": "D",
                   "bundled": false,
                   "port_channel": {
                      "port_channel_member": true,
                      "port_channel_int": "Port-channel34"
                   }
                }
             },
             "port_channel": {
                "port_channel_member": true,
                "port_channel_member_intfs": [
                   "TenGigabitEthernet1/0/3"
                ]
             }
          }
       }
    }   

maqsshah avatar Jul 22 '21 13:07 maqsshah

I have the same problem

carlosnizolli avatar Jun 27 '22 21:06 carlosnizolli

Hi carlos,

this is related to the parser used by the library. It is handled at https://github.com/h2non/jsonpath-ng

elrandira avatar Jun 28 '22 07:06 elrandira