title: Filter: [?] can not be applied to primitives processing Spring Cloud Contract DSL
body: <p>I have a Spring Cloud Contract DSL that looks like this:</p>
  
  <pre><code>    package contracts.someconsumer.messaging
  
      import org.springframework.cloud.contract.spec.Contract
  
      Contract.make {
          label 'my_label'
          // input to the contract
          input {
              // the contract will be triggered by a method
              triggeredBy('someMethodThatSendsMessage()')
          }
  
          // output message of the contract
          outputMessage {
              // destination to which the output message will be sent
              sentTo 'Consumer.contractTest.VirtualTopic.some_destination'
  
              // the body of the output message
              body([
                  id: value(consumer('11111111-2222-3333-4444-555555555555'),producer(regex(uuid()))),
                  correlationId: value(producer(regex(uuid()))), 
                  service: 'MY_SERVICE',
                  payload:  
                  [
                      email: 'test@example.com'
                  ]
              ])
          }
      }
  </code></pre>
  
  <p>Without the "payload" part everything works great.  With the payload, I encounter this exception:</p>
  
  <p><code>com.jayway.jsonpath.InvalidPathException: Filter: [?] can not be applied to primitives. Current context is: {"email":"test@example.com","legalName":"ACME Inc"}
          at com.jayway.jsonpath.internal.path.PredicatePathToken.evaluate(PredicatePathToken.java:66) ~[json-path-2.2.0.jar:2.2.0]
          at com.jayway.jsonpath.internal.path.PathToken.handleObjectProperty(PathToken.java:81) ~[json-path-2.2.0.jar:2.2.0]
          at com.jayway.jsonpath.internal.path.PropertyPathToken.evaluate(PropertyPathToken.java:79) ~[json-path-2.2.0.jar:2.2.0]
          at com.jayway.jsonpath.internal.path.RootPathToken.evaluate(RootPathToken.java:62) ~[json-path-2.2.0.jar:2.2.0]
  </code></p>
  
  <p>The relevant line from the generated test:</p>
  
  <pre><code>        assertThatJson(parsedJson).field("['payload']").field("['email']").isEqualTo("test@example.com");
  </code></pre>
  
  <p>Just a little more info, this is what the serialized message looks like:</p>
  
  <p><code>2017-09-21 08:32:03.721  INFO 10716 --- [           main] c.v.sccdemo.producer.InviteServiceImpl   : Event: {"id":"e63de44e-6e1a-4c4e-b98b-3c49a49efc9c","destination":"VirtualTopic.some_destination","correlationId":"8efb9740-5651-4068-8a6e-574ae7759552","service":"MY_SERVICE","payload":"{\"email\":\"test@example.com\",\"legalName\":\"ACME Inc\"}","timestamp":1505997123576,"version":"v1"}
  </code></p>
  
  <p>Am I doing something wrong in the DSL?  Is the 'payload' part of the body expressed correctly?</p>