title: Using Argparse and Json together
body: <p>I am a beginner to Python.</p>
  
  <p>I wanted to know if Argparse and JSON could be used together.
  Say, I have variables <code>p,q,r</code></p>
  
  <p>I could add them to argparse as - </p>
  
  <pre><code>parser.add_argument('-p','--param1',help='x variable', required=True)
  parser.add_argument('-q','--param2',help='y variable', required=True)
  parser.add_argument('-r','--param3',help='z variable', required=True)
  </code></pre>
  
  <p>Now suppose I wanted to read the same variables from JSON file, is it possible to do it?
  So I could input the values either from command line or a JSON file.</p>
  
  <p>JSON input file -</p>
  
  <pre><code>{
      "testOwner": "my name",
      "tests": [
          "test1",
          "test2",
          "test3"
      ],
  
      "testParameters": {
          "test1": {
              "param1": "0",
              "param2": "20",
              "param3" : "True"
          },
  
          "test2": {
              "param1": "cc"
          }
      }   
  }
  </code></pre>