I am working with an API that requires the json key value pairs to be ordered when creating resources. The API provides a method (called new) that allows you to make a GET request that will return an object model. I would like to update the model with values within my RobotFramework test cases. Is there a native way within Robot Framework to make a GET request and preserve the json object order sent by the server? Here's an example of the JSON response to the GET new method:
{
"account": {
"@id": "",
"@uri": "",
"@oldID": "",
"person": {
"@id": "",
"@uri": ""
},
"accountType": {
"@id": "",
"@uri": "",
"name": null
},
"accountName": "",
"createdDate": null,
"createdByPerson": {
"@id": "",
"@uri": ""
},
"lastUpdatedDate": null,
"lastUpdatedByPerson": {
"@id": "",
"@uri": ""
}
}
}
If I use the following, the key values automatically get sorted:
${r}= GET Request MySession /accounts/new