Python server scripting with request list parameter cannot get to work


#1

Hi, i have this http://<test-api-server.com>/api/v2/my_api_product/GetQcStatus?SkuSellerList=[‘123’]

as we can see from the URL above , where the get parameter is SkuSellerList=[‘123’]
now,

# get query params from request
req_params = event.request.parameters;
if req_params.get("SkuSellerList"):
    return json_loads_byteified( req_params.get("SkuSellerList")) ;

the above code will return the value of the SkuSellerList , it WILL work when the
parameter is NOT STRING LIST , i.e. [123,111,34] ,

but when it is [‘123’,‘111’.‘34’] it won’t work , neither will [“123”,“111”,“34”] , single quote , double quote SAME result , it won’t work.

and if i put the parameter["“SkuSellerList”"] as [123,E123] ,
it will return error as follow ,

{
  "error": {
    "context": null,
    "message": "No JSON object could be decoded",
    "code": 500
  }
}

i have also tried , urllib.urlencode() it , it just won’t work. can some one point me to the correct way of handling this parameter ?

Thanks,
Kalmen