lilinkevin / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

Cannot use JsonPath for attributes starting with a number #318

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For example:

{
   "6269f15a0bb9b1b7d86ae718e84cddcd" : {
            "attr1":"val1",
            "attr2":"val2",
            "attrx":"valx"
   }
}

Should work: body("6269f15a0bb9b1b7d86ae718e84cddcd.attr1", equalTo("val1")) 
but fails. 

Work-around is to escape with ": 
body("\"6269f15a0bb9b1b7d86ae718e84cddcd\".attr1", equalTo("val1"))

Original issue reported on code.google.com by johan.ha...@gmail.com on 11 Mar 2014 at 8:09

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 12 Mar 2014 at 7:05