REST API request body with python dictionary

Dinuka :

I am working with AWS REST API. I am trying to invoke glue job via REST API. For that, I need to pass arguments as JSON object. And withing this json object, I should pass python dictionary as JSON value. This is the request body,

   {
    "Arguments":{
    "jobParameter":"{
  'key1':'keyname=subvalue',
  'key2':'value2'
}"

},
    "JobName":"jobname"
    }

python dictionary = { 'key1':'keyname=subvalue', 'key2':'value2' }

When I test the API by giving this as input, it gives an error,

{ "__type": "SerializationException" }

Please can anyone help with this?

Rafael Ribeiro :

I think it's not recognizing as a valid JSON. Try send something diferente as parameter of jobParameter to test.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=375495&siteId=1