<div dir="ltr"><div><div><div><div><div><div><div>Hi all<br><br></div>When I run neutron -f json in the command below, the pools value is quoted so I cannot use it with JSON parsers like jq<br><br>For example, this is neutron's problematic output [1] (see the pools line)<br><br>$ neutron lbaas-loadbalancer-show ef315cff-1d0a-4327-93c6-e9bf7e544e2d -f json <br>{<br>  "description": "", <br>  "admin_state_up": false, <br>  "tenant_id": "1bcf7ba13bcb496196d72f481bfebb5c", <br>  "provisioning_status": "ACTIVE", <br>  "vip_subnet_id": "d02c8267-30be-4cdc-aa4a-a7c1ca6504b8", <br>  "listeners": "", <br>  "vip_address": "10.0.2.160", <br>  "vip_port_id": "07227a77-1afe-466b-9d54-20e8637fc2b0", <br>  "provider": "f5networks", <br>  "pools": "{\"id\": \"1b792ace-0cbf-47cc-a3d5-2140c570ccee\"}", <br>  "id": "ef315cff-1d0a-4327-93c6-e9bf7e544e2d", <br>  "operating_status": "ONLINE", <br>  "name": "test-lbaasv2"<br>}<br><br></div>Which triggers an error in jq (or other tools)<br><br>neutron lbaas-loadbalancer-show ef315cff-1d0a-4327-93c6-e9bf7e544e2d -f json | jq ".<a href="http://pools.id">pools.id</a>"<br>jq: error: Cannot index string with string<br><br><br></div>If instead I use the followin JSON without the double quotes it works just fine<br><br>$ cat myjson<br>{<br>  "description": "", <br>  "admin_state_up": false, <br>  "tenant_id": "1bcf7ba13bcb496196d72f481bfebb5c", <br>  "provisioning_status": "ACTIVE", <br>  "vip_subnet_id": "d02c8267-30be-4cdc-aa4a-a7c1ca6504b8", <br>  "listeners": "", <br>  "vip_address": "10.0.2.160", <br>  "vip_port_id": "07227a77-1afe-466b-9d54-20e8637fc2b0", <br>  "provider": "f5networks", <br>  "pools": {"id": "1b792ace-0cbf-47cc-a3d5-2140c570ccee"}, <br>  "id": "ef315cff-1d0a-4327-93c6-e9bf7e544e2d", <br>  "operating_status": "ONLINE", <br>  "name": "test-lbaasv2"<br>}<br>$ cat myjson | jq ".<a href="http://pools.id">pools.id</a>"<br>"1b792ace-0cbf-47cc-a3d5-2140c570ccee"<br><br></div>Questions, questions...<br><br></div>Is it intentional the output of [1] or is it a bug? If it is not a bug and it is intentional... how is it expected we should be parsing it?<br><br></div>Comments would be greatly appreciated<br><br></div><div>Many thanks<br><br><br></div><div><br></div><div><div><div><div><div><div><br></div></div></div></div></div></div></div>