peartherapeutics / bitrise-aws-device-farm-file-deploy

MIT License
6 stars 15 forks source link

parsing of JSOn could be done with a real parser to using the cut command #7

Closed evaneos-mobile-integration-continue closed 7 years ago

evaneos-mobile-integration-continue commented 7 years ago

when creating the upload, the JSON returned by the create-upload is not parsed, but rather the variables are extracted by using the cut command.

Instead i have used the python son parser to extract the variable:

 uploadURL=$(echo $createUploadResult | python -c 'import son,sys;obj=json.load(sys.stdin);print obj["upload"]["url"]')
 uploadARN=$(echo $createUploadResult | python -c 'import son,sys;obj=json.load(sys.stdin);print obj["upload"]["arn"]')