title: How to Decode JSON object in Laravel
body: <p>I want to decode gallery array JSON objects in Laravel 5.1. my JSON is:</p>
  
  <pre><code>{
    "title": "aaaaaaaaaaaaaaaa",
    "category_id": "1",
    "user_id": "1",
    "gallery": "[{name: \"XCB808tvXNpqXKqekA2HlkJ8H.jpg\",size:5112},{name: \"s6kA6B0e5m1sdSAjPXqNwtiy4.jpg\", size: 13135}]"
  }
  </code></pre>
  
  <p>When I use this code, return me <code>null</code>:</p>
  
  <pre><code>public function store(Request $request)
      {
           $json = json_decode($request['gallery'],true);
           return $json;
      }
  }
  </code></pre>
  
  <p>and this is <code>dd($request['gallery'])</code> result</p>
  
  <pre><code>[{'name': "XCB808tvXNpqXKqekA2HlkJ8H.jpg",'size':5112},{'name': "s6kA6B0e5m1sdSAjPXqNwtiy4.jpg", 'size': 13135}]
  </code></pre>