def executeJson(self, url, options):
    data = json.dumps(options.__dict__)
if options.verbose:
    print(data)
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
return requests.post(url, data, headers=headers)
Serializing python object instance to JSON