title: how to validate json data in laravel
body: <p>Here is the json data I send through postman for 'specification' field:</p>
  
  <pre><code>{
  "specification": [
      {
        "type": [
            {
                "type": "Smartphone , Phablet , Notch Phone , Camera Phone , Selfie Phone",
                "shape": "Bar"
            }
        ],
        "basic": [
            {
                "os": "Smartphone , Phablet , Notch Phone , Camera Phone , Selfie Phone",
                "Sim": "Bar"
            }
        ]
      }
    ]
  }
  </code></pre>
  
  <p>Then in controller the validation rule is:</p>
  
  <pre><code>'specification' =&gt; 'required|json'
  </code></pre>
  
  <p>The error message: "The specification must be a valid JSON string."</p>
  
  <p>how can I send and check valid json in laravel controller?</p>