I'm working on REST APIs with Symfony but my json\_decode function returns null with my array. I've seen that he can be a probleme with encoding but i'm not sure.
Here's my json :

```
{
    "id": 1,
    "title": "Titre",
    "content": "Contenu",
    "vendeur": null
}

```

Here's my functions to serialize and decode json :

```
/**
 * @Route("/api_articles_list", name="api_articles_list")
 * @Method({"GET"})
 */

public function showActionListSerialize()

{

    $articles =   $this->getDoctrine()->getRepository('AppBundle:Article')->findAll();

   // return new JsonResponse(array('articles' => $articles));

    $data =  $this->get('serializer')->serialize($articles, 'json');

    $response = new Response($data);

    $response->headers->set('Content-Type', 'application/json');

    return $response;

}

/**
 * @Route("/api_articles_list/articles_list", name="articles_list")
 * @Method({"GET"})
 */
public function showActionList()

{

    $articles = json_decode(utf8_encode($this->showActionListSerialize()), true);

    var_dump($articles);
    return $this->render('listeArticles.html.twig', array('articles' => $articles));

}

```