Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 527

How can i validate a json against a template in jq?

$
0
0

I am having a shell script . in my shell script i have a command that returns the following data as a json .

{"remoteIds": [    {"remoteId": "[fd00:10:244:1:0:0:0:12]--(http://fd00-10-244-1--12.nspace.pod:8080)","requestsReceived": 1    }}

i want to validate the above output with a json template. in my json template i can provide the port, nspace , protocol (http) & requestsReceived . How can i design a json template and validate against the json data . i can use jq and bash script

The following will be a template in my mind

{"remoteIds": [    {"remoteId": "[*]--(http://*.nspace.pod:8080)","requestsReceived": 1    }}

thank you


Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>