peritus / robotframework-httplibrary

Robot Framework keywords for HTTP requests
http://peritus.github.com/robotframework-httplibrary/
76 stars 77 forks source link

Get Response body KW is not reading the json object which has got array. #38

Open raghugitrepo opened 8 years ago

raghugitrepo commented 8 years ago

Hi,

I am trying to read below response body using Get Resonse Body KW.

{
    "addresses": [
        {
            "id": "490",
            "city": "city93111",
            "country": "country93111",
            "house": "house93111",
            "state": "state93111",
            "street": "street93111",
            "zip": 93111,
            "firstname": "singh",
            "lastname": "singh",
            "defaultAddress": 1,
            "phone": null,
            "gender": null,
            "landmark": null,
            "area": null
        },
        {
            "id": "491",
            "city": "city93111",
            "country": "country93111",
            "house": "house93111",
            "state": "state93111",
            "street": "street93111",
            "zip": 93111,
            "firstname": "singh",
            "lastname": "singh",
            "defaultAddress": 0,
            "phone": null,
            "gender": null,
            "landmark": null,
            "area": null
        }
    ]
}

But the response it is reading is below

${Response} = {"addresses":[]}

can you please help me how to get the content inside the list?

Quick response is very much appreciated.

peritus commented 8 years ago

Could you provide a little more context ? What is your actual RF code, what is your server's HTTP response?