title: Mountebank - How do I assert message body is JSON format in a POST request in mountebank
body: <p>I want to stub and check the message body in POST request in mountebank, </p>
  
  <pre><code>{
    "port": "22001",
    "protocol": "http",
    "name": "login_user",
    "stubs": [
      {
        "responses": [
          {
            "is": {
              "statusCode": 201,
              "headers": {
                "Content-Type": "application/json"
              },
              "body": {}
            },
            "_behaviors": {
              "wait": 100
            }
          }
        ],
        "predicates": [
          {
            "equals": {
              "path": "/login_user",
              "method": "POST",
              "headers": {
                "Content-Type": "application/json"
              },
              "body": {
                "name": "Tony",
                "age": "20"
              }
            }
          }
        ]
      }
    ]
  }
  
  </code></pre>
  
  <p>if a message body in JSON format. expected response status Code 200.</p>
  
  <p>for Example</p>
  
  <pre><code>{ 
    "body": {
      "name": "Tony",
      "age": "20"
    }
  }
  </code></pre>
  
  <p>if a message body in JSON format <strong>but JSON string</strong>. expected response status Code 400.</p>
  
  <p>for Example </p>
  
  <pre><code>{ 
    "body": "{\"name\": \"Tony\", \"age\": \"20\"}"
  }
  </code></pre>