Skip to content

Instantly share code, notes, and snippets.

@lielran
Created June 2, 2014 08:18
Show Gist options
  • Save lielran/075cc7ee24564067994f to your computer and use it in GitHub Desktop.
Save lielran/075cc7ee24564067994f to your computer and use it in GitHub Desktop.
Python -Sonar Json parsing
http://www.cambus.net/parsing-json-from-command-line-using-python/
curl -v --user sonar:sonar "http://sonar.sonar.com:9000/api/resources?resource=[project:sonar:key]&metrics=coverage" | python -c 'import sys, json; print json.load(sys.stdin)[0]["msr"][0]["frmt_val"]'
http://www.cambus.net/parsing-json-from-command-line-using-python/
curl -v --user sonar:sonar "http://sonar.sonar.com:9000/api/resources?resource=[project:sonar:key]&metrics=it_coverage" | python -c 'import sys, json; print json.load(sys.stdin)[0]["msr"][0]["frmt_val"]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment